wp_count_posts хук-фильтр . WP 3.7.0
Modify returned post counts by status for the current post type.
Использование
add_filter( 'wp_count_posts', 'filter_function_name_1428', 10, 3 ); function filter_function_name_1428( $counts, $type, $perm ){ // filter... return $counts; }
- $counts(объект)
- An object containing the current post_type's post counts by status.
- $type(строка)
- Post type.
- $perm(строка)
- The permission to determine if the posts are 'readable' by the current user.
Список изменений
С версии 3.7.0 | Введена. |
Где вызывается хук
wp_count_posts
wp-includes/post.php 2710
return apply_filters( 'wp_count_posts', $counts, $type, $perm );
wp-includes/post.php 2672
return apply_filters( 'wp_count_posts', $counts, $type, $perm );