mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 13:14:29 +00:00
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:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user