Opened 14 years ago
Closed 14 years ago
#2491 closed defect (bug) (fixed)
Allowing an array of templates to be passed to bp_located_template filters.
Reported by: | kunalb | Owned by: | kunalb |
---|---|---|---|
Milestone: | 1.2.6 | Priority: | normal |
Severity: | Version: | ||
Component: | Core | Keywords: | has-patch needs-testing |
Cc: | kunalb |
Description
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.
Patch