[wp-trac] [WordPress Trac] #57766: filter query_loop_block_query_vars repeater 4 times

WordPress Trac noreply at wordpress.org
Sat Feb 18 21:20:51 UTC 2023


#57766: filter query_loop_block_query_vars repeater 4 times
--------------------------+-----------------------------
 Reporter:  gigito78      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Query         |    Version:  6.1.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hello! I think that filter query_loop_block_query_vars be repeated 4 times
 foreach query.

 Tried to use this simple code in functions.php(theme Twenty Twenty-Two, no
 plugins):

 add_filter( 'query_loop_block_query_vars', function( $query, $block ){
 echo '1<br>';
 return $query;

 }, 21, 2 );

 You can notice 4 times 1 on top of the page.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57766>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list