функция
since 5.1.0
is_avatar_comment_type()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
is_avatar_comment_type( string $comment_type ): bool
Описание
Проверяет, разрешает ли этот тип комментария получение аватаров.
Параметры
$comment_type
string
обязательный
Тип комментария для проверки.
Возвращаемое значение
bool
Исходный код
wp-includes/link-template.php:4345
function is_avatar_comment_type( $comment_type ) {
/**
* Filters the list of allowed comment types for retrieving avatars.
*
* @since 3.0.0
*
* @since 6.9.0 The 'note' comment type was added.
*
* @param array $types An array of content types. Default contains 'comment' and 'note'.
*/
$allowed_comment_types = apply_filters( 'get_avatar_comment_types', array( 'comment', 'note' ) );
return in_array( $comment_type, (array) $allowed_comment_types, true );
}
История изменений
| Версия | Описание |
|---|---|
| 5.1.0 | Introduced. |

