[buddypress-trac] [BuddyPress] #2491: Allowing an array of templates to be passed to bp_located_template filters.
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Fri Jul 2 18:27:06 UTC 2010
#2491: Allowing an array of templates to be passed to bp_located_template filters.
--------------------+-------------------------------------------------------
Reporter: kunalb | Owner: kunalb
Type: defect | Status: new
Priority: normal | Milestone: 1.2.6
Component: Core | Keywords: has-patch needs-testing
--------------------+-------------------------------------------------------
bp_core_load_template() is supposed to be able to accept either an array
of possible template names (so that based on whether the given template
exists or not, wp can fall back along this array).
However, in bp_core_catch_no_access, the complete bp_path (where files
that can be loaded are stored) is assumed to be a single string, appended
with .php and passed on to load_template as well as the filter
bp_located_template resulting in the file "Array.php" being given as the
required template.
I've attached a patch to correct this. A work around till then is for any
functions based on bp_located_template to pick up the file names from the
global $bp_path.
--
Ticket URL: <http://trac.buddypress.org/ticket/2491>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list