get_comments_number хук-фильтр . WP 1.5.0
Filters the returned comment count for a post.
Использование
add_filter( 'get_comments_number', 'filter_function_name_6264', 10, 2 ); function filter_function_name_6264( $count, $post_id ){ // filter... return $count; }
- $count(строка/число)
- A string representing the number of comments a post has, otherwise 0.
- $post_id(число)
- Post ID.
Список изменений
С версии 1.5.0 | Введена. |
Где вызывается хук
get_comments_number
wp-includes/comment-template.php 872
return apply_filters( 'get_comments_number', $count, $post_id );