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 ) {
291291 return ;
292292 }
293293
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+ }
296300 }
297301
298302 if ( isset ( $ query ->query_vars ['count ' ] ) && true === $ query ->query_vars ['count ' ] ) {
Original file line number Diff line number Diff line change 11<?php
22$ mentions = get_comments (
33 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 ' ,
713 )
814);
915
1016$ 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 );
1218
1319do_action ( 'webmention_before_reaction_list ' );
1420
2127<ul class="reaction-list reaction-list--<?php echo esc_attr ( $ mention_type ); ?> ">
2228 <h2><?php echo get_webmention_comment_type_attr ( $ mention_type , 'label ' ); ?> </h2>
2329
24- <?php if ( ( $ fold_limit > 0 ) && $ fold_limit < count ( $ mentions ) ) {
30+ <?php
31+ if ( ( $ fold_limit > 0 ) && $ fold_limit < count ( $ mentions ) ) {
2532 $ overflow = array_slice ( $ mentions , $ fold_limit );
26- $ show = array_slice ( $ mentions , 0 , $ fold_limit );
27- ?>
33+ $ show = array_slice ( $ mentions , 0 , $ fold_limit );
34+ ?>
2835 <details class="webmention-facepile">
2936 <summary>
3037 <?php
4754 );
4855 ?>
4956 </details>
50- <?php
57+ <?php
5158 } else {
5259 wp_list_comments (
5360 array (
5461 'avatar_only ' => true ,
5562 'avatar_size ' => 64 ,
56-
5763 ),
5864 $ mentions
5965 );
You can’t perform that action at this time.
0 commit comments