[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:33:48 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:
-----------------------------------+------------------------------

Comment (by CrazyJaco):

 @johnbillion Thank you for the reply! I was thinking about this last night
 and came to a similar realization. If two plugins added an element each to
 the array, they wouldn't know which element in the array was necessarily
 their piece of data since it is not an associative array. Changing it to
 one would be a breaking change so that is out of the question.

 Are you suggestion something like this:

 {{{#!php
 <?php
 QueryData[0] => query syntax
 QueryData[1] => elapsed time,
 QueryData[2] => stacktrace,
 Querydata[3] => apply_filter( Array(
       custom_meta_key_1 => custom_meta_value_1,
       custom_meta_key_2 => custom_meta_value_2
     )
   )
 }}}


 so that QueryData[3] is just set to an empty filterable associative array?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42151#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list