get_avatar_comment_types
Filters the list of allowed comment types for retrieving avatars.
Usage
add_filter( 'get_avatar_comment_types', 'wp_kama_get_avatar_comment_types_filter' );
/**
* Function for `get_avatar_comment_types` filter-hook.
*
* @param array $types An array of content types.
*
* @return array
*/
function wp_kama_get_avatar_comment_types_filter( $types ){
// filter...
return $types;
}
- $types(array)
- An array of content types.
Default: contains 'comment' and 'note'
Changelog
| Since 3.0.0 | Introduced. |
| Since 6.9.0 | The 'note' comment type was added. |
Where the hook is called
get_avatar_comment_types
wp-includes/link-template.php 4355
$allowed_comment_types = apply_filters( 'get_avatar_comment_types', array( 'comment', 'note' ) );