Skip to:
Content

BuddyPress.org

Ticket #7694: 7694.patch

File 7694.patch, 1.7 KB (added by pscolv, 8 years ago)
  • buddypress-functions.php

     
    382382
    383383                // No need to check child if template == stylesheet.
    384384                if ( is_child_theme() ) {
    385                         $locations['bp-child'] = array(
     385                        $locations[] = array(
     386                                'type'  => 'bp-child',
    386387                                'dir'  => get_stylesheet_directory(),
    387388                                'uri'  => get_stylesheet_directory_uri(),
     389                                'file' => $file,
     390                        );
     391                       
     392                        $locations[] = array(
     393                                'type'  => 'bp-child',
     394                                'dir'  => get_stylesheet_directory(),
     395                                'uri'  => get_stylesheet_directory_uri(),
    388396                                'file' => str_replace( '.min', '', $file ),
    389                         );
     397                        );                     
    390398                }
    391399
    392                 $locations['bp-parent'] = array(
     400                $locations[] = array(
     401                        'type'  => 'bp-parent',
    393402                        'dir'  => get_template_directory(),
    394403                        'uri'  => get_template_directory_uri(),
    395404                        'file' => str_replace( '.min', '', $file ),
    396405                );
    397406
    398                 $locations['bp-legacy'] = array(
     407                $locations[] = array(
     408                        'type'  => 'bp-legacy',
    399409                        'dir'  => bp_get_theme_compat_dir(),
    400410                        'uri'  => bp_get_theme_compat_url(),
    401411                        'file' => $file,
     
    410420
    411421                $retval = array();
    412422
    413                 foreach ( $locations as $location_type => $location ) {
     423                foreach ( $locations as $location ) {
    414424                        foreach ( $subdirs as $subdir ) {
    415425                                if ( file_exists( trailingslashit( $location['dir'] ) . trailingslashit( $subdir ) . $location['file'] ) ) {
    416426                                        $retval['location'] = trailingslashit( $location['uri'] ) . trailingslashit( $subdir ) . $location['file'];
    417                                         $retval['handle']   = ( $script_handle ) ? $script_handle : "{$location_type}-{$type}";
     427                                        $retval['handle']   = ( $script_handle ) ? $script_handle : "{$location['type']}-{$type}";
    418428
    419429                                        break 2;
    420430                                }