WordPress.org

Make WordPress Core

Changeset 24559


Ignore:
Timestamp:
07/05/2013 03:17:31 PM (5 years ago)
Author:
ryan
Message:

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

fixes #23155

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r24524 r24559  
    17351735 */
    17361736function noindex() {
    1737     $public = get_option( 'blog_public' );
    1738 
    1739     if ( is_multisite() ) {
    1740         // Compare local and global and override with the local setting if they
    1741         // don't match.
    1742 
    1743         global $current_blog;
    1744 
    1745         if ( ( '' != $public ) && ( $public != $current_blog->public ) ) {
    1746             update_blog_status( get_current_blog_id(), 'public', $public );
    1747             $current_blog->public = $public;
    1748         }
    1749     }
    1750 
    17511737    // If the blog is not public, tell robots to go away.
    1752     if ( '0' == $public )
     1738    if ( '0' == get_option('blog_public') )
    17531739        wp_no_robots();
    17541740}
Note: See TracChangeset for help on using the changeset viewer.