get_avatar_comment_types
Filter HookDescription
Filters the list of allowed comment types for retrieving avatars.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 4342 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$types
|
An array of content types. Default only contains 'comment'. |
Usage Examples
Basic Usage
<?php
// Hook into get_avatar_comment_types
add_filter('get_avatar_comment_types', 'my_custom_filter', 10, 1);
function my_custom_filter($types) {
// Your custom filtering logic here
return $types;
}
Source Code Context
wp-includes/link-template.php:4342
- How this hook is used in WordPress core
<?php
4337 *
4338 * @since 3.0.0
4339 *
4340 * @param array $types An array of content types. Default only contains 'comment'.
4341 */
4342 $allowed_comment_types = apply_filters( 'get_avatar_comment_types', array( 'comment' ) );
4343
4344 return in_array( $comment_type, (array) $allowed_comment_types, true );
4345 }
4346
4347 /**
PHP Documentation
<?php
/**
* Filters the list of allowed comment types for retrieving avatars.
*
* @since 3.0.0
*
* @param array $types An array of content types. Default only contains 'comment'.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/link-template.php
Related Hooks
Related hooks will be displayed here in future updates.