[buddypress-trac] [BuddyPress] #2198: bp_core_load_template does not load plugin's sub-templates

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Mon May 3 11:39:26 UTC 2010


#2198: bp_core_load_template does not load plugin's sub-templates
--------------------+-------------------------------------------------------
 Reporter:  DJPaul  |        Owner:        
     Type:  defect  |       Status:  closed
 Priority:  minor   |    Milestone:  1.3   
Component:  Core    |   Resolution:  fixed 
 Keywords:          |  
--------------------+-------------------------------------------------------
Changes (by DJPaul):

  * status:  assigned => closed
  * resolution:  => fixed


Comment:

 To load a template within a template from a plugin rather than from the
 theme -- a sub-template -- you need to do something like:

 {{{
 function load_sub_template( $template ) {
         if ( $located_template = apply_filters( 'bp_located_template',
 locate_template( $template , false ), $template ) )
                 load_template( apply_filters( 'bp_load_template',
 $located_template ) );
 }
 load_sub_template( array( 'achievements/_addedit.php' ) );
 }}}

-- 
Ticket URL: <http://trac.buddypress.org/ticket/2198#comment:6>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list