Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/29/2012 10:57:49 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Template Locator:

  • Move parent/child/fallback out of loop
  • Fix parent/child loader issue, where child theme templates still loaded the parent.
  • Updates made to bp_locate_template() only.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-template-loader.php

    r6329 r6365  
    6262
    6363    // No file found yet
    64     $located = false;
     64    $located        = false;
     65    $child_theme    = get_stylesheet_directory();
     66    $parent_theme   = get_template_directory();
     67    $fallback_theme = bp_get_theme_compat_dir();
    6568
    6669    // Try to find a template file
     
    7376        // Trim off any slashes from the template name
    7477        $template_name = ltrim( $template_name, '/' );
    75         $child_theme    = get_stylesheet_directory();
    76         $parent_theme   = get_template_directory();
    77         $fallback_theme = bp_get_theme_compat_dir();
    7878
    7979        // Check child theme first
     
    8484        // Check parent theme next
    8585        } elseif ( file_exists( trailingslashit( $parent_theme ) . $template_name ) ) {
    86             $located = trailingslashit( $child_theme ) . $template_name;
     86            $located = trailingslashit( $parent_theme ) . $template_name;
    8787            break;
    8888
Note: See TracChangeset for help on using the changeset viewer.