WC_Comments::is_default_comment_type()private staticWC 4.3.0

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 8.7.0

private static function is_default_comment_type( $comment_type ) {
	return ( '' === $comment_type || 'comment' === $comment_type );
}