]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/ms-default-filters.php
WordPress 4.0
[autoinstalls/wordpress.git] / wp-includes / ms-default-filters.php
index 759c81f0edcfeda9b28aea8631e26dc1c94b7348..7481ec9a027ccbbf2f4c483463501447cfb3509b 100644 (file)
@@ -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' );