Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit b14c6e1

Browse files
committed
Prepare for WordPress 5.5 comment type change
1 parent 8e07caf commit b14c6e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

includes/class-linkbacks-handler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ public static function enhance( $commentdata, $comment = array(), $commentarr =
204204
// remove "webmention" comment-type if $type is "reply"
205205
if ( isset( $commentdata['comment_meta']['semantic_linkbacks_type'] ) ) {
206206
if ( in_array( $commentdata['comment_meta']['semantic_linkbacks_type'], apply_filters( 'semantic_linkbacks_comment_types', array( 'reply' ) ), true ) ) {
207-
$commentdata['comment_type'] = '';
207+
// https://core.trac.wordpress.org/ticket/49236 - As of WP5.5, comment will be the default comment type, not empty.
208+
$commentdata['comment_type'] = version_compare( get_bloginfo( 'version'), '5.5', '>=' ) ) ? 'comment' : '';
208209
}
209210
}
210211

0 commit comments

Comments
 (0)