[wp-trac] [WordPress Trac] #15061: Allow either array or string to be passed to locate_template
WordPress Trac
wp-trac at lists.automattic.com
Mon Oct 11 01:43:25 UTC 2010
#15061: Allow either array or string to be passed to locate_template
--------------------------+-------------------------------------------------
Reporter: chrisbliss18 | Owner: scribu
Type: enhancement | Status: reopened
Priority: normal | Milestone: 3.1
Component: Template | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+-------------------------------------------------
Changes (by hakre):
* status: closed => reopened
* resolution: fixed =>
Comment:
Replying to [comment:7 scribu]:
> If you don't like casts to arrays, please open a separate ticket to
address that issue across the board, since it's practiced in a lot of
places. Thanks.
Indeed. But that's a sidenote only, I reopened it because of the added
complexity which is on topic.
----
I suggest to move {{{locate_template()}}} into
{{{locate_template_array()}}} / {{{locate_templates()}}} and then to
create {{{locate_template()}}} that works on a single template. In case
there is code sharing between the two functions, this can be re-factored
into an additional function as well. probably {{{locate_templates()}}}
makes use of {{{locate_template()}}} as well.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15061#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list