[wp-trac] [WordPress Trac] #31271: Allow is_page_template() to accept an array of templates to check.
WordPress Trac
noreply at wordpress.org
Thu Mar 12 06:20:40 UTC 2015
#31271: Allow is_page_template() to accept an array of templates to check.
-------------------------------+---------------------------
Reporter: morganestes | Owner: DrewAPicture
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 4.2
Component: Posts, Post Types | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: template
-------------------------------+---------------------------
Changes (by helen):
* keywords: has-patch commit => has-patch
Comment:
Seems like it would be nice to get some tests going for the `default`
case. Would also highly recommend wrapping `in_array( 'default',
$template, true ) && ! $page_template` in parens so it's clear what the
grouping is, rather than trickily relying on operator precedence.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31271#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list