In wp_count_posts(), rename 'count_posts' hook to 'wp_count_posts', for clarity. see #16603.

git-svn-id: https://develop.svn.wordpress.org/trunk@25578 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2013-09-23 19:07:08 +00:00
parent 7203c7c012
commit fbc417775d
2 changed files with 21 additions and 25 deletions

View File

@@ -817,12 +817,12 @@ class Tests_Post extends WP_UnitTestCase {
) );
$count1 = wp_count_posts( $post_type, 'readable' );
$this->assertEquals( 10, $count1->publish );
add_filter( 'count_posts', array( $this, 'filter_wp_count_posts' ) );
add_filter( 'wp_count_posts', array( $this, 'filter_wp_count_posts' ) );
$count2 = wp_count_posts( $post_type, 'readable' );
$this->assertEquals( 7, $count2->publish );
remove_filter( 'count_posts', array( $this, 'filter_wp_count_posts' ) );
remove_filter( 'wp_count_posts', array( $this, 'filter_wp_count_posts' ) );
}
function filter_wp_count_posts( $counts ) {