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

WordPress Trac noreply at wordpress.org
Wed Mar 13 02:30:40 UTC 2013


#13265: Filter results of get_page_templates()
-------------------------+-----------------------------
 Reporter:  nathanrice   |       Owner:  nathanrice
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  Future Release
Component:  Themes       |     Version:  3.0
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+-----------------------------
Changes (by stephenharris):

 * cc: stephenharris (added)


Comment:

 I don't think the filter should be inside the `WP_Theme` & parent themes.

 Adding the filter in the class method means a call to
 `get_page_templates()` will trigger that filter twice (potentially): once
 for the parent templates - and once for the child & parent templates.

 It would make sense to just filter the parent & child templates in the
 function `get_page_templates()` instead.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13265#comment:37>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list