get_comment
Fires after a comment is retrieved.
Usage
add_filter( 'get_comment', 'wp_kama_get_comment_filter' );
/**
* Function for `get_comment` filter-hook.
*
* @param WP_Comment|null $_comment Comment data.
*
* @return WP_Comment|null
*/
function wp_kama_get_comment_filter( $_comment ){
// filter...
return $_comment;
}
- $_comment(WP_Comment|null)
- Comment data.
Changelog
| Since 2.3.0 | Introduced. |
Where the hook is called
get_comment
wp-includes/comment.php 245
$_comment = apply_filters( 'get_comment', $_comment );