Skip to:
Content

Changeset 6462


Ignore:
Timestamp:
10/22/12 10:38:21 (18 months ago)
Author:
johnjamesjacoby
Message:

Theme Compat:

  • Add 'bp_add_template_locations' filter back to 'bp_get_template_part' filter.
  • Add array_unique() to bp_add_template_locations() to remove possible duplicates.
  • See #3741.
Location:
trunk/bp-core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-filters.php

    r6447 r6462  
    6363 
    6464// Run all template parts through additional template locations 
    65 add_filter( 'bp_locate_template', 'bp_add_template_locations' ); 
     65add_filter( 'bp_locate_template',   'bp_add_template_locations' ); 
     66add_filter( 'bp_get_template_part', 'bp_add_template_locations' ); 
    6667 
    6768// Turn comments off for BuddyPress pages 
  • trunk/bp-core/bp-core-template-loader.php

    r6439 r6462  
    206206            $retval[] = ltrim( trailingslashit( $location ) . $template, '/' ); 
    207207 
    208     return apply_filters( 'bp_add_template_locations', $retval, $templates ); 
     208    return apply_filters( 'bp_add_template_locations', array_unique( $retval ), $templates ); 
    209209} 
    210210 
Note: See TracChangeset for help on using the changeset viewer.