Make WordPress Core

Ticket #27952: 27952.1.diff

File 27952.1.diff, 1.2 KB (added by midxcat, 10 years ago)
  • wp-includes/ms-default-filters.php

     
    3434
    3535// Administration
    3636add_filter( 'term_id_filter', 'global_terms', 10, 2 );
    37 add_action( 'publish_post', 'update_posts_count' );
    3837add_action( 'delete_post', '_update_blog_date_on_post_delete' );
     38add_action( 'transition_post_status', 'update_posts_count' );
    3939add_action( 'transition_post_status', '_update_blog_date_on_post_publish', 10, 3 );
    4040
    4141// Counts
  • wp-includes/ms-functions.php

     
    17601760 *
    17611761 * WordPress MS stores a blog's post count as an option so as
    17621762 * to avoid extraneous COUNTs when a blog's details are fetched
    1763  * with get_blog_details(). This function is called when posts
    1764  * are published to make sure the count stays current.
     1763 * with get_blog_details(). This function is called when posts'
     1764 * status are changed to make sure the count stays current.
    17651765 *
    17661766 * @since MU
    17671767 */