comment_id_fields
Filters the returned comment ID fields.
Использование
add_filter( 'comment_id_fields', 'wp_kama_comment_id_fields_filter', 10, 3 );
/**
* Function for `comment_id_fields` filter-hook.
*
* @param string $comment_id_fields The HTML-formatted hidden ID field comment elements.
* @param int $post_id The post ID.
* @param int $reply_to_id The ID of the comment being replied to.
*
* @return string
*/
function wp_kama_comment_id_fields_filter( $comment_id_fields, $post_id, $reply_to_id ){
// filter...
return $comment_id_fields;
}
- $comment_id_fields(строка)
- The HTML-formatted hidden ID field comment elements.
- $post_id(int)
- The post ID.
- $reply_to_id(int)
- The ID of the comment being replied to.
Список изменений
| С версии 3.0.0 | Введена. |
Где вызывается хук
comment_id_fields
wp-includes/comment-template.php 2066
return apply_filters( 'comment_id_fields', $comment_id_fields, $post_id, $reply_to_id );