Opened 16 months ago
Closed 8 months ago
#59514 closed enhancement (fixed)
Add more context to split_the_query filter
Reported by: | spacedmonkey | Owned by: | spacedmonkey |
---|---|---|---|
Milestone: | 6.6 | Priority: | normal |
Severity: | normal | Version: | 3.4 |
Component: | Query | Keywords: | has-patch commit |
Focuses: | performance | Cc: |
Description
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.
Attachments (3)
Change History (18)
This ticket was mentioned in PR #5363 on WordPress/wordpress-develop by @spacedmonkey.
16 months ago
#1
- Keywords has-patch added
This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.
12 months ago
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
12 months ago
#6
@
12 months ago
Hi there, so you think this one can be committed in time for beta 1 tomorrow?
Also please note that the @since
mention needs to be updated in the docblock.
#7
@
12 months ago
Hi, attached is a patch with similar changes as the current PR, but adding the @since
to the docblock and removing the $q
parameter as it is available through $query->query_vars
.
#8
@
12 months ago
- Milestone changed from 6.5 to 6.6
As per today's pre-release party check, let's move this one to milestone 6.6 as we're very close to release 6.5 beta 1.
This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.
11 months ago
This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.
9 months ago
#12
@
8 months ago
I have refreshed the patch & also changed in docs. Added @since 6.6.0
instead of @since 6.5.0
.
Patch: https://core.trac.wordpress.org/attachment/ticket/59514/59514.2.patch
Trac ticket: https://core.trac.wordpress.org/ticket/59514