Opened 15 years ago
Closed 15 years ago
#1137 closed defect (bug) (fixed)
Passing $bp_path as an array was deprecated silently between 1.0.3 and 1.1
Reported by: | dat_paulchen | Owned by: | |
---|---|---|---|
Milestone: | 1.1.1 | Priority: | major |
Severity: | Version: | ||
Component: | Keywords: | ||
Cc: | paul.grill@… |
Description
In buddypress 1.0.3 it was possible to do the following:
bp_core_load_template( array( 'MyPlugin/edit-object', 'plugin-template' ) );
This was kind of my fallback mechanism in case there were no appropriate theme files for MyPlugin in the themes folder.
Due to changes in bp_core_do_catch_uri it is no longer possible to pass multiple templates in an array; if $bp_path is an array, bp_core_do_catch_uri will tell locate_template to look for a file called "Array.php".
I do not think this is expected behavior since WP's locate_template function was intended to analyze an array of template files and use whichever was found.
While the comments for bp_core_load_template are bogus anyways, the documentation for bp_catch_uri states (note the "file names")
* @param $pages Template file names to use.
Any thoughts why bp_core_do_catch_uri no longer checks whether $bp_path is an array?
Not sure how that happened, I will gladly add this back in for 1.1.1. Can you provide a patch?