[wp-trac] [WordPress Trac] #59514: Add more context to split_the_query filter

WordPress Trac noreply at wordpress.org
Mon Oct 2 11:41:06 UTC 2023


#59514: Add more context to split_the_query filter
--------------------------+--------------------
 Reporter:  spacedmonkey  |      Owner:  (none)
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  6.5
Component:  Query         |    Version:  3.4
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
--------------------------+--------------------
 Current the split_the_query filter has the current WP_Query instance as
 context. However to calculate the value you need the value variables.

 - $old_request
 - $limits
 - $fields
 - $q ( query arguments ).

 It is worth noting that `$this->request` can be received by `WP_Query`
 instance and `$wpdb->posts` can be received from global $wpdb.

 With this extra context, will be make the filter much more useful.

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


More information about the wp-trac mailing list