X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0461a5f2e55c8d5f1fde96ca2e83117152573c7d..9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f:/wp-includes/ms-default-filters.php diff --git a/wp-includes/ms-default-filters.php b/wp-includes/ms-default-filters.php index 759c81f0..7481ec9a 100644 --- a/wp-includes/ms-default-filters.php +++ b/wp-includes/ms-default-filters.php @@ -34,9 +34,10 @@ add_filter( 'allowed_redirect_hosts', 'redirect_this_site' ); // Administration add_filter( 'term_id_filter', 'global_terms', 10, 2 ); -add_action( 'publish_post', 'update_posts_count' ); +add_action( 'delete_post', '_update_posts_count_on_delete' ); add_action( 'delete_post', '_update_blog_date_on_post_delete' ); add_action( 'transition_post_status', '_update_blog_date_on_post_publish', 10, 3 ); +add_action( 'transition_post_status', '_update_posts_count_on_transition_post_status', 10, 2 ); // Counts add_action( 'admin_init', 'wp_schedule_update_network_counts'); @@ -69,6 +70,11 @@ add_filter( 'force_filtered_html_on_import', '__return_true' ); remove_filter( 'option_siteurl', '_config_wp_siteurl' ); remove_filter( 'option_home', '_config_wp_home' ); +// Some options changes should trigger blog details refresh. +add_action( 'update_option_blogname', 'refresh_blog_details', 10, 0 ); +add_action( 'update_option_siteurl', 'refresh_blog_details', 10, 0 ); +add_action( 'update_option_post_count', 'refresh_blog_details', 10, 0 ); + // If the network upgrade hasn't run yet, assume ms-files.php rewriting is used. add_filter( 'default_site_option_ms_files_rewriting', '__return_true' );