Changeset 4264
- Timestamp:
- 10/22/2012 10:40:31 AM (13 years ago)
- Location:
- trunk/includes/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/core/filters.php
r4249 r4264 170 170 171 171 // Filter bbPress template locations 172 add_filter( 'bbp_locate_template', 'bbp_add_template_locations' ); 172 173 add_filter( 'bbp_get_template_part', 'bbp_add_template_locations' ); 173 174 add_filter( 'bbp_get_profile_template', 'bbp_add_template_locations' ); -
trunk/includes/core/template-functions.php
r4249 r4264 66 66 $parent_theme = get_template_directory(); 67 67 $fallback_theme = bbp_get_theme_compat_dir(); 68 69 // Allow templates to be filtered 70 // bbPress core automatically adds bbp_add_template_locations() 71 $template_names = apply_filters( 'bbp_locate_template', $template_names ); 68 72 69 73 // Try to find a template file … … 164 168 165 169 // Loop through locations and templates and combine 166 foreach ( $locations as $location )167 foreach ( $templates as $template )168 $retval[] = trailingslashit( $location ) . $template;169 170 return apply_filters( 'bbp_add_template_locations', $retval, $templates );170 foreach ( (array) $locations as $location ) 171 foreach ( (array) $templates as $template ) 172 $retval[] = ltrim( trailingslashit( $location ) . $template, '/' ); 173 174 return apply_filters( 'bbp_add_template_locations', array_unique( $retval ), $templates ); 171 175 } 172 176
Note: See TracChangeset
for help on using the changeset viewer.