mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 12:51:58 +00:00
Fire the update_blog_public action from update_blog_status() instead of update_blog_public(). Pass blog ID and value to the action.
Add code to noindex() to sync the 'public' value in the site options table with the blog_public value in the options table. fixes #23155 git-svn-id: https://develop.svn.wordpress.org/trunk@23794 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1703,8 +1703,22 @@ function wlwmanifest_link() {
|
||||
* @since 2.1.0
|
||||
*/
|
||||
function noindex() {
|
||||
$public = get_option( 'blog_public' );
|
||||
|
||||
if ( is_multisite() ) {
|
||||
// Compare local and global and override with the local setting if they
|
||||
// don't match.
|
||||
|
||||
global $current_blog;
|
||||
|
||||
if ( ( '' != $public ) && ( $public != $current_blog->public ) ) {
|
||||
update_blog_status( get_current_blog_id(), 'public', $public );
|
||||
$current_blog->public = $public;
|
||||
}
|
||||
}
|
||||
|
||||
// If the blog is not public, tell robots to go away.
|
||||
if ( '0' == get_option('blog_public') )
|
||||
if ( '0' == $public )
|
||||
wp_no_robots();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user