WC_Comments::is_default_comment_type()
Determines if a comment is of the default type.
Prior to WordPress 5.5, '' was the default comment type. As of 5.5, the default type is 'comment'.
Метод класса: WC_Comments{}
Хуков нет.
Возвращает
true|false
.
Использование
$result = WC_Comments::is_default_comment_type( $comment_type );
- $comment_type(строка) (обязательный)
- Comment type.
Список изменений
С версии 4.3.0 | Введена. |
Код WC_Comments::is_default_comment_type() WC Comments::is default comment type WC 9.8.1
private static function is_default_comment_type( $comment_type ) { return ( '' === $comment_type || 'comment' === $comment_type ); }