[wp-trac] [WordPress Trac] #13239: Filter locate_template template_names variable
WordPress Trac
noreply at wordpress.org
Wed Feb 12 03:39:34 UTC 2014
#13239: Filter locate_template template_names variable
----------------------------------------+-----------------------
Reporter: chrisbliss18 | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: 3.9
Component: Themes | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch 3.3-early commit | Focuses:
----------------------------------------+-----------------------
Comment (by MikeSchinkel):
Replying to [comment:61 DrewAPicture]:
> I agree if if we end up going with [attachment:13239.2.diff] (plus hook
docs).
I just added [attachment:13239.8.diff] based on 13239.2.diff with the
following changes:
1. Adds hook docs.
2. Follows new bracing coding standard ''(i.e. don't use single line
`if()` without braces.)''
3. Added spaces in expressions to be consistent with WordPress coding
standard
4. Added ability to short-circuit loading a template file by having the
filter return `false`.
5. Captured value of expressions that called `get_stylesheet_directory()`
and `get_template_directory()` into variable `$filepath` so those
functions need not be called twice ''(and so that value is easier to debug
within `locate_template()`).''
--
Ticket URL: <https://core.trac.wordpress.org/ticket/13239#comment:62>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list