Skip to:
Content

BuddyPress.org

Changeset 9882


Ignore:
Timestamp:
05/20/2015 08:58:09 PM (5 years ago)
Author:
hnla
Message:

Companion styles stylefile enqueueing

Commit updates stylesheet paths in buddypress-functions.php from get_stylesheet() to get_directory() to ensure child themes inherit the companion stylesheets.

Commit also updates rtl checking & enqueueing only if rtl is in use.

Fixes #6124 Props r-a-y

File:
1 edited

Legend:

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

    r9846 r9882  
    212212     *
    213213     * @since BuddyPress (1.7)
     214     * @since BuddyPress (2.3.0) Support custom CSS file named after the current theme or parent theme.
    214215     *
    215216     * @uses wp_enqueue_style() To enqueue the styles
     
    220221        // Locate the BP stylesheet
    221222        $ltr = $this->locate_asset_in_stack( "buddypress{$min}.css",     'css' );
    222         $rtl = $this->locate_asset_in_stack( "buddypress-rtl{$min}.css", 'css' );
    223223
    224224        // LTR
     
    242242
    243243        // Compatibility stylesheets for specific themes.
    244         $asset = $this->locate_asset_in_stack( get_stylesheet() . "{$min}.css", 'css' );
     244        $asset = $this->locate_asset_in_stack( get_template() . "{$min}.css", 'css' );
    245245        if ( isset( $asset['location'] ) ) {
    246246            // use a unique handle
    247             $asset['handle'] = 'bp-' . get_stylesheet();
     247            $asset['handle'] = 'bp-' . get_template();
    248248            wp_enqueue_style( $asset['handle'], $asset['location'], array(), $this->version, 'screen' );
    249249
Note: See TracChangeset for help on using the changeset viewer.