Skip to:
Content

BuddyPress.org

Changeset 11897


Ignore:
Timestamp:
03/07/2018 02:44:19 PM (8 years ago)
Author:
djpaul
Message:

Templates, Legacy: fix minified assets not enqueued when in child theme.

Fixes #7694

Props pscolv

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress-functions.php

    r11889 r11897  
    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',
     387                                'dir'  => get_stylesheet_directory(),
     388                                'uri'  => get_stylesheet_directory_uri(),
     389                                'file' => $file,
     390                        );
     391
     392                        $locations[] = array(
     393                                'type' => 'bp-child',
    386394                                'dir'  => get_stylesheet_directory(),
    387395                                'uri'  => get_stylesheet_directory_uri(),
     
    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(),
     
    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(),
     
    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;
Note: See TracChangeset for help on using the changeset viewer.