[wp-trac] [WordPress Trac] #12354: WP_WidgetArea class
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 25 17:08:30 UTC 2010
#12354: WP_WidgetArea class
-------------------------+--------------------------------------------------
Reporter: jimisaacs | Owner:
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: Widgets | Version:
Severity: normal | Keywords: widgets dev-feedback
-------------------------+--------------------------------------------------
Comment(by scribu):
> Is there any talk of maybe allowing access to something like a
conditional array or object a developer can just check all in one shot?
You can already do something like that yourself:
{{{
function check( $conditions ) {
foreach( $conditions as $key => $value )
if ( get_query_var($key) != $value )
return false;
return true;
}
}}}
Usage:
{{{
if ( check(array('year' => 2010, 'post_type' => 'foo')) )
// bar
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12354#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list