Opened 2 years ago
Closed 22 months ago
#59514 closed enhancement (fixed)
Add more context to split_the_query filter
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| 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.
2 years ago
#1
- Keywords has-patch added
This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.
2 years ago
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
2 years ago
#6
@
2 years 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
@
2 years 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
@
2 years 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.
2 years ago
This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.
23 months ago
#12
@
22 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