[wp-trac] [WordPress Trac] #15086: get_template_part() should let you specify a directory
WordPress Trac
wp-trac at lists.automattic.com
Mon Oct 11 06:32:27 UTC 2010
#15086: get_template_part() should let you specify a directory
---------------------------+------------------------------------------------
Reporter: aaroncampbell | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 3.0
Severity: normal | Keywords: dev-feedback
---------------------------+------------------------------------------------
Comment(by westi):
Personally, I never intended for {{{get_template_part()}}} to look in
directories.
The fact that it does is a bug IMHO.
But I guess some theme authors appear to like creating lots of directories
within the theme.
It looks like @Viper007Bond added the directory example to the codex :-(
http://codex.wordpress.org/index.php?title=Function_Reference/get_template_part&diff=92384&oldid=90074
The phpdoc was always clear about the functions intentions.
Putting the files in directories makes it harder for child themes to
override as they now have to mimic the directory structure even if they
want to override a single part.
I would be tempted to sanitise out everything that isn't legal in a
filename!
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15086#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list