[wp-trac] [WordPress Trac] #13265: Filter results of get_page_templates()
WordPress Trac
wp-trac at lists.automattic.com
Wed May 5 20:44:18 UTC 2010
#13265: Filter results of get_page_templates()
-------------------------+--------------------------------------------------
Reporter: nathanrice | Owner: nathanrice
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Themes | Version: 3.0
Severity: normal | Keywords: page templates, filter
-------------------------+--------------------------------------------------
Comment(by nathanrice):
Replying to [comment:1 nacin]:
> There's a typo in the patch.
Indeed there was. Fixed and re-uploaded.
> I don't like the idea of adding filters after the feature freeze and
especially once we're deep in beta
Fair enough. I knew it was a long-shot for 3.0. Just hoped it was a small
enough change to make it in. You guys know more about the larger
implications than I do, so I defer to your judgment on that one.
> we need to then account for filters in the future. Maintaining back
compat is difficult, and this just makes it more so.
Is it just a matter of naming conventions? I've got no problem renaming
the filter to something more specific like "get_page_templates" to match
the function name, if that helps.
> In this case, two tickets jump out at me for why we should not be
rushing this: #12253 and #10959. Just because we return page templates
doesn't mean they won't then work.
I don't see the relevance in #12253, but I do see some issue with #10959.
But given the fact that a plugin/theme could filter, and thus control, the
entire array (keys and values), assuming they do it correctly, the new
page template would show up in the dropdown with the correct file location
as the value (folder/file.php or folder/folder/file.php).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13265#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list