[wp-trac] [WordPress Trac] #19243: Introduce WP_Query::exists(), or have WP_Query::get() return false for non-existence

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 28 18:17:24 UTC 2012


#19243: Introduce WP_Query::exists(), or have WP_Query::get() return false for non-
existence
-------------------------+------------------------------
 Reporter:  nacin        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Query        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by WraithKenny):

 http://core.trac.wordpress.org/ticket/16303#comment:1 Westi's code there
 suggests a workaround: you can hook to 'request' and set the var to true
 if isset but empty, then when checking get_query_var in template_redirect
 or wherever, if it's false or empty then it hadn't been set.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19243#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list