File tree Expand file tree Collapse file tree 2 files changed +21
-11
lines changed Expand file tree Collapse file tree 2 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -291,8 +291,12 @@ public static function comment_query( $query ) {
291
291
return ;
292
292
}
293
293
294
- if ( ! empty ( $ query ->query_vars ['type__in ' ] ) ) {
295
- return ;
294
+ if ( ! empty ( $ query ->query_vars ['meta_query ' ] ) ) {
295
+ $ query = current ( $ query ->query_vars ['meta_query ' ] );
296
+
297
+ if ( ! empty ( $ query ['key ' ] ) && 'protocol ' === $ query ['key ' ] ) {
298
+ return ;
299
+ }
296
300
}
297
301
298
302
if ( isset ( $ query ->query_vars ['count ' ] ) && true === $ query ->query_vars ['count ' ] ) {
Original file line number Diff line number Diff line change 1
1
<?php
2
2
$ mentions = get_comments (
3
3
array (
4
- 'post_id ' => get_the_ID (),
5
- 'type__in ' => get_webmention_comment_type_names (),
6
- 'status ' => 'approve ' ,
4
+ 'post_id ' => get_the_ID (),
5
+ 'type__in ' => get_webmention_comment_type_names (),
6
+ 'meta_query ' => array (
7
+ array (
8
+ 'key ' => 'protocol ' ,
9
+ 'compare ' => 'EXISTS ' ,
10
+ ),
11
+ ),
12
+ 'status ' => 'approve ' ,
7
13
)
8
14
);
9
15
10
16
$ grouped_mentions = separate_comments ( $ mentions );
11
- $ fold_limit = get_option ( 'webmention_facepile_fold_limit ' , 0 );
17
+ $ fold_limit = get_option ( 'webmention_facepile_fold_limit ' , 0 );
12
18
13
19
do_action ( 'webmention_before_reaction_list ' );
14
20
21
27
<ul class="reaction-list reaction-list--<?php echo esc_attr ( $ mention_type ); ?> ">
22
28
<h2><?php echo get_webmention_comment_type_attr ( $ mention_type , 'label ' ); ?> </h2>
23
29
24
- <?php if ( ( $ fold_limit > 0 ) && $ fold_limit < count ( $ mentions ) ) {
30
+ <?php
31
+ if ( ( $ fold_limit > 0 ) && $ fold_limit < count ( $ mentions ) ) {
25
32
$ overflow = array_slice ( $ mentions , $ fold_limit );
26
- $ show = array_slice ( $ mentions , 0 , $ fold_limit );
27
- ?>
33
+ $ show = array_slice ( $ mentions , 0 , $ fold_limit );
34
+ ?>
28
35
<details class="webmention-facepile">
29
36
<summary>
30
37
<?php
47
54
);
48
55
?>
49
56
</details>
50
- <?php
57
+ <?php
51
58
} else {
52
59
wp_list_comments (
53
60
array (
54
61
'avatar_only ' => true ,
55
62
'avatar_size ' => 64 ,
56
-
57
63
),
58
64
$ mentions
59
65
);
You can’t perform that action at this time.
0 commit comments