[wp-trac] [WordPress Trac] #49362: The docs for is_page_template should clarify it is expecting a filename

WordPress Trac noreply at wordpress.org
Wed Feb 5 00:28:36 UTC 2020


#49362: The docs for is_page_template should clarify it is expecting a filename
--------------------------+-----------------------------
 Reporter:  mkaz          |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  minor         |   Keywords:
  Focuses:  template      |
--------------------------+-----------------------------
 The function `is_page_template()` accepts a filename as a parameter, this
 is not the same thing as the template name which is what the inline docs
 refer to. The template name is specified in the header of the template for
 example:

 page-cool.php

 {{{
 /**
   * Template name: My Cool Template
   */

 }}}


 The parameter should be `page-cool.php` and not `My Cool Template`

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


More information about the wp-trac mailing list