[buddypress-trac] [BuddyPress] #1137: Passing $bp_path as an array was deprecated silently between 1.0.3 and 1.1

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Thu Oct 1 16:51:45 UTC 2009


#1137: Passing $bp_path as an array was deprecated silently between 1.0.3 and 1.1
-------------------------+--------------------------------------------------
Reporter:  dat_paulchen  |       Owner:     
    Type:  defect        |      Status:  new
Priority:  major         |   Milestone:     
Keywords:                |  
-------------------------+--------------------------------------------------
 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 name'''s'''")
 {{{
  * @param $pages Template file names to use.
 }}}

 Any thoughts why bp_core_do_catch_uri no longer checks whether $bp_path is
 an array?

-- 
Ticket URL: <http://trac.buddypress.org/ticket/1137>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list