Changeset 4326
- Timestamp:
- 11/03/2012 10:44:26 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/core/template-functions.php
r4324 r4326 64 64 $located = false; 65 65 66 // Loop through template stack67 foreach ( (array) bbp_get_template_stack() as $template_location) {68 69 // Continue if $template_locationis empty70 if ( empty( $template_ location) )66 // Try to find a template file 67 foreach ( (array) $template_names as $template_name ) { 68 69 // Continue if template is empty 70 if ( empty( $template_name ) ) 71 71 continue; 72 72 73 // Try to find a template file 74 foreach ( (array) $template_names as $template_name ) { 75 76 // Continue if template is empty 77 if ( empty( $template_name ) ) 73 // Trim off any slashes from the template name 74 $template_name = ltrim( $template_name, '/' ); 75 76 // Loop through template stack 77 foreach ( (array) bbp_get_template_stack() as $template_location ) { 78 79 // Continue if $template_location is empty 80 if ( empty( $template_location ) ) 78 81 continue; 79 80 // Trim off any slashes from the template name81 $template_name = ltrim( $template_name, '/' );82 82 83 83 // Check child theme first 84 84 if ( file_exists( trailingslashit( $template_location ) . $template_name ) ) { 85 85 $located = trailingslashit( $template_location ) . $template_name; 86 break ;86 break 2; 87 87 } 88 88 }
Note: See TracChangeset
for help on using the changeset viewer.