post_comments_link
Filters the formatted post comments link HTML.
Использование
add_filter( 'post_comments_link', 'wp_kama_post_comments_link_filter', 10, 2 ); /** * Function for `post_comments_link` filter-hook. * * @param string $post_reply_link The HTML-formatted post comments link. * @param int|WP_Post $post The post ID or WP_Post object. * * @return string */ function wp_kama_post_comments_link_filter( $post_reply_link, $post ){ // filter... return $post_reply_link; }
- $post_reply_link(строка)
- The HTML-formatted post comments link.
- $post(int|WP_Post)
- The post ID or WP_Post object.
Список изменений
С версии 2.7.0 | Введена. |
Где вызывается хук
post_comments_link
wp-includes/comment-template.php 1965
return apply_filters( 'post_comments_link', $post_reply_link, $post );