@@ -201,29 +201,33 @@ public static function update_meta( $comment_id, $commentdata ) {
201
201
public static function get_comment_type_excerpts () {
202
202
$ strings = array (
203
203
// translators: Name verb on domain
204
- 'mention ' => __ ( '%1$s mentioned %2$s on <a href="%3$s">%4$s</a>. ' , 'semantic-linkbacks ' ),
204
+ 'mention ' => __ ( '%1$s mentioned %2$s on <a href="%3$s">%4$s</a>. ' , 'semantic-linkbacks ' ),
205
205
// translators: Name verb on domain
206
- 'reply ' => __ ( '%1$s replied to %2$s on <a href="%3$s">%4$s</a>. ' , 'semantic-linkbacks ' ),
206
+ 'reply ' => __ ( '%1$s replied to %2$s on <a href="%3$s">%4$s</a>. ' , 'semantic-linkbacks ' ),
207
207
// translators: Name verb on domain
208
- 'repost ' => __ ( '%1$s reposted %2$s on <a href="%3$s">%4$s</a>. ' , 'semantic-linkbacks ' ),
208
+ 'repost ' => __ ( '%1$s reposted %2$s on <a href="%3$s">%4$s</a>. ' , 'semantic-linkbacks ' ),
209
209
// translators: Name verb on domain
210
- 'like ' => __ ( '%1$s liked %2$s on <a href="%3$s">%4$s</a>. ' , 'semantic-linkbacks ' ),
210
+ 'like ' => __ ( '%1$s liked %2$s on <a href="%3$s">%4$s</a>. ' , 'semantic-linkbacks ' ),
211
211
// translators: Name verb on domain
212
- 'favorite ' => __ ( '%1$s favorited %2$s on <a href="%3$s">%4$s</a>. ' , 'semantic-linkbacks ' ),
212
+ 'favorite ' => __ ( '%1$s favorited %2$s on <a href="%3$s">%4$s</a>. ' , 'semantic-linkbacks ' ),
213
213
// translators: Name verb on domain
214
- 'tag ' => __ ( '%1$s tagged %2$s on <a href="%3$s">%4$s</a>. ' , 'semantic-linkbacks ' ),
214
+ 'tag ' => __ ( '%1$s tagged %2$s on <a href="%3$s">%4$s</a>. ' , 'semantic-linkbacks ' ),
215
215
// translators: Name verb on domain
216
- 'bookmark ' => __ ( '%1$s bookmarked %2$s on <a href="%3$s">%4$s</a>. ' , 'semantic-linkbacks ' ),
216
+ 'bookmark ' => __ ( '%1$s bookmarked %2$s on <a href="%3$s">%4$s</a>. ' , 'semantic-linkbacks ' ),
217
217
// translators: Name verb on domain
218
- 'rsvp:yes ' => __ ( '%1$s is <strong>attending</strong>. ' , 'semantic-linkbacks ' ),
218
+ 'rsvp:yes ' => __ ( '%1$s is <strong>attending</strong>. ' , 'semantic-linkbacks ' ),
219
219
// translators: Name verb on domain
220
- 'rsvp:no ' => __ ( '%1$s is <strong>not attending</strong>. ' , 'semantic-linkbacks ' ),
220
+ 'rsvp:no ' => __ ( '%1$s is <strong>not attending</strong>. ' , 'semantic-linkbacks ' ),
221
221
// translators: Name verb on domain
222
- 'rsvp:maybe ' => __ ( 'Maybe %1$s will be <strong>attending</strong>. ' , 'semantic-linkbacks ' ),
222
+ 'rsvp:maybe ' => __ ( 'Maybe %1$s will be <strong>attending</strong>. ' , 'semantic-linkbacks ' ),
223
223
// translators: Name verb on domain
224
224
'rsvp:interested ' => __ ( '%1$s is <strong>interested</strong> in this event. ' , 'semantic-linkbacks ' ),
225
225
// translators: Name verb on domain
226
- 'invited ' => __ ( '%1$s is <strong>invited</strong>. ' , 'semantic-linkbacks ' ),
226
+ 'invited ' => __ ( '%1$s is <strong>invited</strong>. ' , 'semantic-linkbacks ' ),
227
+ // translators: Name verb on domain
228
+ 'listen ' => __ ( '%1$s is <strong>listening</strong>. ' , 'semantic-linkbacks ' ),
229
+ // translators: Name verb on domain
230
+ 'watch ' => __ ( '%1$s is <strong>watching</strong>. ' , 'semantic-linkbacks ' ),
227
231
);
228
232
229
233
return $ strings ;
@@ -237,19 +241,21 @@ public static function get_comment_type_excerpts() {
237
241
public static function get_comment_type_strings () {
238
242
$ strings = array (
239
243
// Special case. any value that evals to false will be considered standard
240
- 'mention ' => __ ( 'Mention ' , 'semantic-linkbacks ' ),
241
-
242
- 'reply ' => __ ( 'Reply ' , 'semantic-linkbacks ' ),
243
- 'repost ' => __ ( 'Repost ' , 'semantic-linkbacks ' ),
244
- 'like ' => __ ( 'Like ' , 'semantic-linkbacks ' ),
245
- 'favorite ' => __ ( 'Favorite ' , 'semantic-linkbacks ' ),
246
- 'tag ' => __ ( 'Tag ' , 'semantic-linkbacks ' ),
247
- 'bookmark ' => __ ( 'Bookmark ' , 'semantic-linkbacks ' ),
248
- 'rsvp:yes ' => __ ( 'RSVP ' , 'semantic-linkbacks ' ),
249
- 'rsvp:no ' => __ ( 'RSVP ' , 'semantic-linkbacks ' ),
250
- 'rsvp:maybe ' => __ ( 'RSVP ' , 'semantic-linkbacks ' ),
244
+ 'mention ' => __ ( 'Mention ' , 'semantic-linkbacks ' ),
245
+
246
+ 'reply ' => __ ( 'Reply ' , 'semantic-linkbacks ' ),
247
+ 'repost ' => __ ( 'Repost ' , 'semantic-linkbacks ' ),
248
+ 'like ' => __ ( 'Like ' , 'semantic-linkbacks ' ),
249
+ 'favorite ' => __ ( 'Favorite ' , 'semantic-linkbacks ' ),
250
+ 'tag ' => __ ( 'Tag ' , 'semantic-linkbacks ' ),
251
+ 'bookmark ' => __ ( 'Bookmark ' , 'semantic-linkbacks ' ),
252
+ 'rsvp:yes ' => __ ( 'RSVP ' , 'semantic-linkbacks ' ),
253
+ 'rsvp:no ' => __ ( 'RSVP ' , 'semantic-linkbacks ' ),
254
+ 'rsvp:maybe ' => __ ( 'RSVP ' , 'semantic-linkbacks ' ),
251
255
'rsvp:interested ' => __ ( 'RSVP ' , 'semantic-linkbacks ' ),
252
- 'invited ' => __ ( 'Invited ' , 'semantic-linkbacks ' ),
256
+ 'invited ' => __ ( 'Invited ' , 'semantic-linkbacks ' ),
257
+ 'listen ' => __ ( 'Listening ' , 'semantic-linkbacks ' ),
258
+ 'watch ' => __ ( 'Watching ' , 'semantic-linkbacks ' ),
253
259
);
254
260
255
261
return $ strings ;
@@ -420,21 +426,21 @@ public static function comment_text_add_cite( $text, $comment = null, $args = ar
420
426
*/
421
427
public static function get_post_type ( $ post_id ) {
422
428
$ post_typestrings = self ::get_post_type_strings ();
423
- $ post_type = $ post_typestrings [ 'post ' ];
424
-
429
+ $ post_type = $ post_typestrings ['post ' ];
430
+
425
431
// If this is the page homepages are redirected to then use the site name
426
432
if ( $ post_id === get_option ( 'webmention_home_mentions ' , 0 ) ) {
427
433
$ post_type = get_bloginfo ( 'name ' );
428
- } else if ( 'page ' === get_post_type ( $ post_id ) ) {
429
- $ post_type = $ post_typestrings [ 'page ' ];
430
- } else if ( current_theme_supports ( 'post-formats ' ) ) {
434
+ } elseif ( 'page ' === get_post_type ( $ post_id ) ) {
435
+ $ post_type = $ post_typestrings ['page ' ];
436
+ } elseif ( current_theme_supports ( 'post-formats ' ) ) {
431
437
$ post_format = get_post_format ( $ post_id );
432
-
438
+
433
439
// add "standard" as default for post format enabled types
434
440
if ( ! $ post_format || ! in_array ( $ post_format , array_keys ( $ post_typestrings ), true ) ) {
435
441
$ post_format = 'standard ' ;
436
442
}
437
-
443
+
438
444
$ post_type = $ post_typestrings [ $ post_format ];
439
445
}
440
446
@@ -603,19 +609,21 @@ public static function comment_class( $classes, $class, $comment_id, $post_id )
603
609
$ comment = get_comment ( $ comment_id );
604
610
// "comment type to class" mapper
605
611
$ class_mapping = array (
606
- 'mention ' => array ( 'u-mention ' ),
607
-
608
- 'reply ' => array ( 'u-comment ' ),
609
- 'repost ' => array ( 'u-repost ' ),
610
- 'like ' => array ( 'u-like ' ),
611
- 'favorite ' => array ( 'u-favorite ' ),
612
- 'tag ' => array ( 'u-tag ' ),
613
- 'bookmark ' => array ( 'u-bookmark ' ),
614
- 'rsvp:yes ' => array ( 'u-rsvp ' ),
615
- 'rsvp:no ' => array ( 'u-rsvp ' ),
616
- 'rsvp:maybe ' => array ( 'u-rsvp ' ),
612
+ 'mention ' => array ( 'u-mention ' ),
613
+
614
+ 'reply ' => array ( 'u-comment ' ),
615
+ 'repost ' => array ( 'u-repost ' ),
616
+ 'like ' => array ( 'u-like ' ),
617
+ 'favorite ' => array ( 'u-favorite ' ),
618
+ 'tag ' => array ( 'u-tag ' ),
619
+ 'bookmark ' => array ( 'u-bookmark ' ),
620
+ 'rsvp:yes ' => array ( 'u-rsvp ' ),
621
+ 'rsvp:no ' => array ( 'u-rsvp ' ),
622
+ 'rsvp:maybe ' => array ( 'u-rsvp ' ),
617
623
'rsvp:interested ' => array ( 'u-rsvp ' ),
618
- 'invited ' => array ( 'u-invitee ' ),
624
+ 'invited ' => array ( 'u-invitee ' ),
625
+ 'listen ' => array ( 'u-listen ' ),
626
+ 'watch ' => array ( 'u-watch ' ),
619
627
);
620
628
621
629
$ semantic_linkbacks_type = self ::get_type ( $ comment );
0 commit comments