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

WordPress Trac noreply at wordpress.org
Fri Dec 9 16:18:02 UTC 2016


#39211: is_page_template could return true on terms
--------------------------+-----------------------------
 Reporter:  natereist     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.7
 Severity:  normal        |   Keywords:
  Focuses:  template      |
--------------------------+-----------------------------
 Since this function no longer checks is_page(), the ID from
 get_queried_object_id will always be used to check the post template slug
 - this ID is not guaranteed to be a post ID. If that ID matches a Post ID
 with that page template it will return true even though that template is
 not being loaded. If that ID matches with any Post ID that does not have
 page template set it will most likely return true is_page_template() with
 no argument.

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


More information about the wp-trac mailing list