Make WordPress Core


Ignore:
Timestamp:
06/26/2014 12:52:25 AM (11 years ago)
Author:
wonderboymusic
Message:

get_blog_details()->post_count should update on more actions than just publish_post.

Adds unit test.

Props 5um17, midxcat, strangerstudios.
Fixes #27952.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-default-filters.php

    r25621 r28835  
    3535// Administration
    3636add_filter( 'term_id_filter', 'global_terms', 10, 2 );
    37 add_action( 'publish_post', 'update_posts_count' );
     37add_action( 'delete_post', '_update_posts_count_on_delete' );
    3838add_action( 'delete_post', '_update_blog_date_on_post_delete' );
    3939add_action( 'transition_post_status', '_update_blog_date_on_post_publish', 10, 3 );
     40add_action( 'transition_post_status', '_update_posts_count_on_transition_post_status', 10, 2 );
    4041
    4142// Counts
Note: See TracChangeset for help on using the changeset viewer.