[wp-trac] [WordPress Trac] #13239: Filter locate_template template_names variable
WordPress Trac
wp-trac at lists.automattic.com
Sun Jul 10 19:30:57 UTC 2011
#13239: Filter locate_template template_names variable
---------------------------------+-----------------------------
Reporter: chrisbliss18 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Themes | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch 3.3-early |
---------------------------------+-----------------------------
Comment (by coffee2code):
I agree there is benefit to having a filter after the template search is
complete. I proposed it as part of the attached patch 13239.c2c.2.diff.
Since @nacin wasn't so sure about as many filters as I originally
proposed, I ultimately decided 13239.c2c.4.diff was most robust.
One capability lost with the filter solely located after the template
search is that you can't preempt the template search. Something I'm keen
to do is prevent WP from having to do `file_exists()` checks for certain
template formats that I know will never exist (such as all the $id based
templates -- category-15.php, post-245.php, etc -- that I never use).
I'd be on board with ''also'' having the post-template-search filter that
you favor (which I originally called 'located_template_located', but I
don't mind whatever name it gets), but I'd like not to lose the pre-
template-search filter.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13239#comment:19>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list