Changeset 4264 for trunk/includes/core/template-functions.php
- Timestamp:
- 10/22/2012 10:40:31 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/includes/core/template-functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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.