[wp-trac] [WordPress Trac] #31271: Allow is_page_template() to accept an array of templates to check.

WordPress Trac noreply at wordpress.org
Mon Feb 9 22:24:50 UTC 2015


#31271: Allow is_page_template() to accept an array of templates to check.
-------------------------------+------------------------------
 Reporter:  morganestes        |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:
-------------------------------+------------------------------
Changes (by tyxla):

 * keywords:   => has-patch


Comment:

 Great idea. Personally I find that useful - it would help avoiding
 repetitive `is_page_template()` calls, making such checks shorter. I'd
 definitely use that often in my projects.

 I've just added a patch that contains 2 unit tests for
 `is_page_template()` with the 2 parameter types.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31271#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list