Don't sync the blog public option from noindex(). This can cause race conditions.

fixes #23155


git-svn-id: http://core.svn.wordpress.org/trunk@24559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren 2013-07-05 15:17:31 +00:00
parent 211a3eec8b
commit d04bce99e8

View File

@ -1734,22 +1734,8 @@ 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' == $public )
if ( '0' == get_option('blog_public') )
wp_no_robots();
}