comment_author хук-фильтр . WP 1.2.0
Filters the comment author's name for display.
Использование
add_filter( 'comment_author', 'filter_function_name_8542', 10, 2 ); function filter_function_name_8542( $author, $comment_ID ){ // filter... return $author; }
- $author(строка)
- The comment author's username.
- $comment_ID(число)
- The comment ID.
Список изменений
С версии 1.2.0 | Введена. |
С версии 4.1.0 | The $comment_ID parameter was added. |
Где вызывается хук
comment_author
wp-includes/comment-template.php 73
echo apply_filters( 'comment_author', $author, $comment->comment_ID );
Где используется хук в ядре WordPress
wp-admin/includes/class-wp-comments-list-table.php 45
add_filter( 'comment_author', array( $this, 'floated_admin_avatar' ), 10, 2 );
wp-includes/default-filters.php 135
add_filter( $filter, 'wptexturize' );
wp-includes/default-filters.php 136
add_filter( $filter, 'convert_chars' );
wp-includes/default-filters.php 137
add_filter( $filter, 'esc_html' );