get_avatar_comment_types
Filters the list of allowed comment types for retrieving avatars.
Использование
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(массив)
- An array of content types.
По умолчанию: only contains 'comment'
Список изменений
С версии 3.0.0 | Введена. |
Где вызывается хук
get_avatar_comment_types
wp-includes/link-template.php 4319
$allowed_comment_types = apply_filters( 'get_avatar_comment_types', array( 'comment' ) );