comment_excerpt
Filters the comment excerpt for display.
Использование
add_filter( 'comment_excerpt', 'wp_kama_comment_excerpt_filter', 10, 2 ); /** * Function for `comment_excerpt` filter-hook. * * @param string $comment_excerpt The comment excerpt text. * @param string $comment_id The comment ID as a numeric string. * * @return string */ function wp_kama_comment_excerpt_filter( $comment_excerpt, $comment_id ){ // filter... return $comment_excerpt; }
- $comment_excerpt(строка)
- The comment excerpt text.
- $comment_id(строка)
- The comment ID as a numeric string.
Список изменений
С версии 1.2.0 | Введена. |
С версии 4.1.0 | The $comment_id parameter was added. |
Где вызывается хук
comment_excerpt
wp-includes/comment-template.php 717
echo apply_filters( 'comment_excerpt', $comment_excerpt, $comment->comment_ID );
Где используется хук в WordPress
wp-includes/default-filters.php 225
add_filter( 'comment_excerpt', 'convert_chars' );