[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 Jul 8 03:02:31 UTC 2019
#42151: Create a filter to add information to query data saved when SAVEQUERIES is
true
-------------------------+---------------------
Reporter: CrazyJaco | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.3
Component: Database | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+---------------------
Comment (by pento):
Thank you for refreshing the patch, @CrazyJaco!
[attachment:"42151.7.diff"] makes a few adjustments to how it works:
- Move the filter from `::do_query()` to `::log_query()`, so all calls to
`::log_query()` can be filtered.
- Instead of filtering just the additional data, filter the entire log
entry, rename the filter to `log_query_data` to match.
- Additional documentation.
Does this change still work for you, @CrazyJaco?
@johnbillion: As one of my favourite consumers of `wpdb::queries`, do you
foresee problems with this patch?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42151#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list