Skip to:
Content

BuddyPress.org

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's profile 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?

Attachments (2)

ticket-1137.patch (944 bytes) - added by dat_paulchen 15 years ago.
ticket-1137.2.patch (945 bytes) - added by dat_paulchen 15 years ago.

Download all attachments as: .zip

Change History (7)

#1 @dat_paulchen
15 years ago

  • Cc paul.grill@… added

#2 @apeatling
15 years ago

Not sure how that happened, I will gladly add this back in for 1.1.1. Can you provide a patch?

#3 @apeatling
15 years ago

  • Milestone set to 1.1.1

#4 @dat_paulchen
15 years ago

Ignore the first one, I just realized we didn't want locate_template to load the template (second patch sets locate_templates $load to false)

#5 @apeatling
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [2027]) Fixes #1137 props dat_paulchen

Note: See TracTickets for help on using tickets.