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'.
Method of the class: WC_Comments{}
No Hooks.
Return
true|false
.
Usage
$result = WC_Comments::is_default_comment_type( $comment_type );
- $comment_type(string) (required)
- Comment type.
Changelog
Since 4.3.0 | Introduced. |
WC_Comments::is_default_comment_type() WC Comments::is default comment type code WC 9.4.2
private static function is_default_comment_type( $comment_type ) { return ( '' === $comment_type || 'comment' === $comment_type ); }