[wp-trac] [WordPress Trac] #39211: is_page_template could return true on terms

WordPress Trac noreply at wordpress.org
Fri Dec 9 22:00:33 UTC 2016


#39211: is_page_template could return true on terms
----------------------------------------+-------------------------
 Reporter:  natereist                   |       Owner:  swissspidy
     Type:  defect (bug)                |      Status:  assigned
 Priority:  normal                      |   Milestone:  4.7.1
Component:  Posts, Post Types           |     Version:  4.7
 Severity:  normal                      |  Resolution:
 Keywords:  needs-unit-tests has-patch  |     Focuses:  template
----------------------------------------+-------------------------
Changes (by swissspidy):

 * owner:   => swissspidy
 * status:  new => assigned


Comment:

 > The `is_page()` check should have been replaced with an `is_singular()`
 check.

 Ditto.

 @natereist Thanks! I'd add braces according to our
 [https://make.wordpress.org/core/handbook/best-practices/coding-
 standards/php/ coding standards], but otherwise that's correct.

 I'll try to add some unit tests if nobody else gets to it.

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


More information about the wp-trac mailing list