[wp-trac] [WordPress Trac] #42151: Create a filter to add information to query data saved when SAVEQUERIES is true
WordPress Trac
noreply at wordpress.org
Mon Oct 9 14:20:42 UTC 2017
#42151: Create a filter to add information to query data saved when SAVEQUERIES is
true
-----------------------------------+------------------------------
Reporter: CrazyJaco | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version:
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses:
-----------------------------------+------------------------------
Changes (by johnbillion):
* keywords: has-patch => has-patch 2nd-opinion
* version: trunk =>
* component: Query => Database
Comment:
Thanks for the patch, @CrazyJaco.
I think this is a bit of a risky change. The idea behind the saved queries
and the associated debugging data is that a debugging plugin can make
assumptions about what data is present in the `wpdb::$queries` property.
If a filter is added here, then that (somewhat weak) contract is broken.
I wonder if it would be better to add an extra element to the stored query
data, the value of which is a filterable array of "extra" and arbitrary
information relating to the query. That way a debugging plugin can use an
expose that information as it wishes, but without the need to worry about
which data is present in the stored queries and in what order.
Related: #41956
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42151#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list