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

Commit 7c76796

Browse files
committed
Store mf2 properties
1 parent 595f045 commit 7c76796

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

includes/class-linkbacks-mf2-handler.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,14 @@ public static function generate_commentdata( $commentdata ) {
224224
// get post type
225225
$commentdata['comment_meta']['semantic_linkbacks_type'] = wp_slash( self::get_entry_type( $commentdata['target'], $entry, $mf_array ) );
226226
}
227+
$blacklist = array( 'name', 'content', 'summary', 'published', 'updated', 'type', 'url', 'comment', 'bridgy-omit-link' );
228+
$blacklist = apply_filters( 'semantic_linkbacks_mf2_props_blacklist', $blacklist );
229+
foreach ( $properties as $key => $value ) {
230+
if ( ! in_array( $key, $blacklist ) ) {
231+
$commentdata['comment_meta'][ 'mf2_' . $key ] = $value;
232+
}
233+
}
234+
$commentdata['comment_meta'] = array_filter( $commentdata['comment_meta'] );
227235

228236
return $commentdata;
229237
}

0 commit comments

Comments
 (0)