[wp-trac] [WordPress Trac] #13265: Filter results of get_page_templates()

WordPress Trac noreply at wordpress.org
Sun Mar 2 09:11:35 UTC 2014


#13265: Filter results of get_page_templates()
-------------------------+-------------------------
 Reporter:  nathanrice   |       Owner:  nathanrice
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  3.9
Component:  Themes       |     Version:  3.0
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  template
-------------------------+-------------------------

Comment (by MikeSchinkel):

 Replying to [comment:52 downstairsdev]:
 > @MikeSchinkel I didn't quite understand your first use case until I
 tested it.  Page templates are available if they are in theme/folder/page-
 template.php, but not if they are another directory level deep, e.g.
 theme/folder/folder/page-template.php.  I didn't realize that.  I had
 assumed WordPress would find a template anywhere in the theme directory
 structure.

 Yep, `get_page_templates()` uses `WP_Theme::get_files()` to one level
 deep, not more, probably for performance reasons.

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


More information about the wp-trac mailing list