[wp-trac] [WordPress Trac] #15086: get_template_part() should let you specify a directory
WordPress Trac
wp-trac at lists.automattic.com
Sun Oct 10 22:22:06 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 aaroncampbell):
If we do that it would fix the main issue, but then I think we should at
least change what we call it to something other than $slug. Everywhere
else in our code $slug is a sanitized string (I'm pretty sure they're all
letters, numbers, underscores, and hyphens only). Also, doing it that way
saves some backward compatibility, but it also means that you can't fall
back through to files in the root theme directory. I checked some of the
popular themes (like themehybrid and Genesis) and haven't seen any that
use get_template_part() that way yet, but I've only got to check a few so
far.It would be nice if someone with access to the themes repository could
run something like this `grep -inR --color
"get_template_part\s*([^/]*/.*)" *` and let us know how often this use of
get_template_part() is.
Scribu did find a few themes using it this way by
[http://www.google.com/#q=site:themes.svn.wordpress.org+get_template_part(
using Google], but it's hard to tell how many would actually be affected.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15086#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list