Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/09/2014 02:55:29 PM (9 years ago)
Author:
djpaul
Message:

Core: load RTL stylesheets when we need to.

Fixes #5614

File:
1 edited

Legend:

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

    r8687 r8770  
    200200     */
    201201    public function enqueue_styles() {
    202 
    203         // LTR or RTL
    204         $file = is_rtl() ? 'buddypress-rtl.css' : 'buddypress.css';
     202        $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    205203
    206204        // Locate the BP stylesheet
    207         $asset = $this->locate_asset_in_stack( $file, 'css' );
     205        $asset = $this->locate_asset_in_stack( 'buddypress.css', 'css' );
    208206
    209207        // Enqueue BuddyPress-specific styling, if found
    210208        if ( isset( $asset['location'], $asset['handle'] ) ) {
    211209            wp_enqueue_style( $asset['handle'], $asset['location'], array(), $this->version, 'screen' );
     210
     211            wp_style_add_data( $asset['handle'], 'rtl', true );
     212            if ( $min ) {
     213                wp_style_add_data( $asset['handle'], 'suffix', $min );
     214            }
    212215        }
    213216    }
Note: See TracChangeset for help on using the changeset viewer.