[wp-trac] [WordPress Trac] #16471: Support default values for non-existant query vars in get_query_var() et al

WordPress Trac wp-trac at lists.automattic.com
Sun Feb 6 15:48:59 UTC 2011


#16471: Support default values for non-existant query vars in get_query_var() et al
-------------------------+-----------------------------
 Reporter:  hakre        |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:  3.0
 Severity:  normal       |   Keywords:  has-patch
-------------------------+-----------------------------
 When using {{{get_query_var($var)}}} or {{{$GLOBALS['wp']->get($var)}}}
 and {{{$var}}} is the name of an unexistant query variable, those
 functions will return an empty string.

 Next to that there is no function that provides information about whether
 or not a specific query variable has been set.

 I therefore suggest to make both functions able to optionally return a
 chooseable default fallback value then the empty string we have.

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


More information about the wp-trac mailing list