[wp-trac] [WordPress Trac] #27328: Conditional tags for wp-admin
WordPress Trac
noreply at wordpress.org
Sat Mar 8 20:34:07 UTC 2014
#27328: Conditional tags for wp-admin
----------------------------+------------------------------
Reporter: ericlewis | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+------------------------------
Comment (by nacin):
The current screen object is pretty resilient for this. I'd rather not add
new top-level functions:
{{{
$screen = get_current_screen();
if ( $screen->base === 'edit' )
if ( $screen->base === 'edit' && $screen->post_type === 'post' )
if ( $screen->base === 'post' )
if ( $screen->base === 'post' && $screen->post_type === 'post' )
if ( $screen->base === 'post' && $screen->action === 'add' )
if ( $screen->base === 'post' && $screen->post_type === 'post' &&
$screen->action === 'add' )
if ( $screen->id === 'tools' )
if ( $screen->base === 'edit-tags' && $screen->taxonomy === 'post_tag' )
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27328#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list