最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

options - What are Attributes used for in a Wordpress Multisite?

programmeradmin1浏览0评论

When you edit a Wordpress Multisite, there is this section of Attributes with multicheckboxes to select from, just curious what this actually does (if anything). I never needed to check "Public" checkbox in here for the site to be shown publicly. This is very strange to me and just wondering how Wordpress uses this and if it's used at all and how?

When you edit a Wordpress Multisite, there is this section of Attributes with multicheckboxes to select from, just curious what this actually does (if anything). I never needed to check "Public" checkbox in here for the site to be shown publicly. This is very strange to me and just wondering how Wordpress uses this and if it's used at all and how?

Share Improve this question asked Feb 20, 2021 at 18:53 Solomon ClossonSolomon Closson 3041 gold badge6 silver badges15 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 6

The "Deleted", "Spam" and "Archived" attributes

If you checked "Deleted", "Spam" or "Archived", the site would no longer be accessible to the public and all users except super admins, and the only thing non super admins would see is a notice saying:

  • "This site is no longer available." if the "Deleted" attribute is checked.

  • "This site has been archived or suspended." if the "Spam" or "Archived" attribute is checked.

And if for example you're an administrator on those sites, then you would not see the sites marked as deleted, spam or archived on the Dashboard → My Sites page. I.e. Only super admins would see them.

The "Mature" attribute

Unlike the above three attributes, the site would continue to display normally to the public even if the "Mature" attribute is checked, so I'm guessing the attribute is merely a flag indicating that the site is intended for mature audiences only — excerpt from get_blog_details() on WordPress Codex:

mature
(integer) Flag indicating if this blog has been marked as for a mature audience.

Moreover, the inline doc for the $mature property in the WP_Site class actually says (see the longer description text):

/**
 * Whether the site should be treated as mature.
 *
 * Handling for this does not exist throughout WordPress core, but custom
 * implementations exist that require the property to be present.
 *
 * ...
 */
public $mature = '0';

And you might find this article on WordPress helpful which shows an example of the above custom implementation?

The "Public" attribute

I never needed to check "Public" checkbox in here for the site to be shown publicly.

Yes, because the purpose of that attribute is actually the same as the "Search engine visibility" option in the Reading Settings — more specifically, the "Discourage search engines from indexing this site" checkbox.

I.e. If the "Public" attribute is not checked, or if the above checkbox is checked, then the noindex meta tag will be added to the document head:

<meta name='robots' content='noindex,nofollow' />

And it's added via noindex() which says:

If a blog is marked as not being public then the noindex meta tag will be output to tell web robots not to index the page content.

Therefore, "public" actually means "allow search engines to index this site", whereas "not public" means the exact opposite — "disallow/discourage search engines from indexing this site". But of course, as WordPress core says, "It is up to search engines to honor this request." :)

Additional Notes

  • If you checked the other attributes than "Public", the site's row in the sites list table on the Sites → All Sites admin page will be highlighted in red/pinkish like so:

    Note: The fifth site (site4) had the "Public" attribute NOT checked.

发布评论

评论列表(0)

  1. 暂无评论