[wp-trac] [WordPress Trac] #23833: Add a unique ID or NAME to target queries .

WordPress Trac noreply at wordpress.org
Thu Mar 21 03:03:56 UTC 2013


#23833: Add a unique ID or NAME to target queries .
-----------------------------+-------------------------
 Reporter:  krembo99         |       Type:  enhancement
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Query
  Version:                   |   Severity:  normal
 Keywords:                   |
-----------------------------+-------------------------
 I am not sure if this is enhancement or feature request .[[BR]]

 wordpress allows us to change / filter  queries with various methods , for
 example the pre_get_posts(). ( e.g.  $query->set ($args) ).

 But in today´s wp ecosystem, there are so many themes, plugins, widgets
 etc. that modify the query or add custom queries, that it had become very
 difficult to target a specific query, where The available conditions might
 not be enough. (is_admin, is_main_query etc.. )

 The suggestion here is to add an identifier (ID or specific NAME) to a
 query , much like with textdomains or actions.

 In this manner, targeting a query becomes a breeze something along the
 lines of
 {{{
 #!php
 $query->set($query_id_or_name,$args)
 }}}

 Each developer has struggled one time or another with custom queries and
 with targeting 3rd party queries .
 This feature / enhancement could potentially change all that by allowing a
 simple way to address custom queries .

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23833>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list