Make WordPress Core

Ticket #26410: 26410.2.diff

File 26410.2.diff, 1.5 KB (added by pento, 10 years ago)
  • src/wp-includes/ms-blogs.php

     
    267267 * Refresh blog details when an option is updated.
    268268 *
    269269 * @access private
    270  * @param string $option_name
    271270 */
    272 function _wp_refresh_blog_details_on_updated_option( $option_name ) {
    273         $options = array( 'blogname', 'siteurl', 'post_count' );
    274         if ( in_array( $option_name, $options ) ) {
    275                 refresh_blog_details( get_current_blog_id() );
    276         }
     271function _wp_refresh_blog_details_on_updated_option() {
     272        refresh_blog_details( get_current_blog_id() );
    277273}
    278274
    279275/**
  • src/wp-includes/ms-default-filters.php

     
    7171remove_filter( 'option_home',    '_config_wp_home'    );
    7272
    7373// Some options changes should trigger blog details refresh.
    74 add_action( 'updated_option', '_wp_refresh_blog_details_on_updated_option' );
     74add_action( 'update_option_blogname', '_wp_refresh_blog_details_on_updated_option' );
     75add_action( 'update_option_siteurl', '_wp_refresh_blog_details_on_updated_option' );
     76add_action( 'update_option_post_count', '_wp_refresh_blog_details_on_updated_option' );
    7577
    7678// If the network upgrade hasn't run yet, assume ms-files.php rewriting is used.
    7779add_filter( 'default_site_option_ms_files_rewriting', '__return_true' );