Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/09/2014 02:55:29 PM (11 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-activity/bp-activity-cssjs.php

    r8754 r8770  
    2121    }
    2222
    23     $min  = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    24     $file = is_rtl() ? "mentions-rtl{$min}.css" : "mentions{$min}.css";
     23    $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    2524
    2625    wp_enqueue_script( 'bp-mentions', buddypress()->plugin_url . "bp-activity/js/mentions{$min}.js", array( 'jquery', 'jquery-atwho' ), bp_get_version(), true );
    27     wp_enqueue_style( 'bp-mentions-css', buddypress()->plugin_url . "bp-activity/css/{$file}", array(), bp_get_version() );
     26    wp_enqueue_style( 'bp-mentions-css', buddypress()->plugin_url . "bp-activity/css/mentions{$min}.css", array(), bp_get_version() );
     27
     28    wp_style_add_data( 'bp-mentions-css', 'rtl', true );
     29    if ( $min ) {
     30        wp_style_add_data( 'bp-mentions-css', 'suffix', $min );
     31    }
    2832
    2933    // Print a list of the current user's friends to the page for quicker @mentions lookups.
     
    5054    }
    5155
    52     $min  = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    53     $file = is_rtl() ? "mentions-rtl{$min}.css" : "mentions{$min}.css";
     56    $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    5457
    5558    wp_enqueue_script( 'bp-mentions', buddypress()->plugin_url . "bp-activity/js/mentions{$min}.js", array( 'jquery', 'jquery-atwho' ), bp_get_version(), true );
    56     wp_enqueue_style( 'bp-mentions-css', buddypress()->plugin_url . "bp-activity/css/{$file}", array(), bp_get_version() );
     59    wp_enqueue_style( 'bp-mentions-css', buddypress()->plugin_url . "bp-activity/css/mentions{$min}.css", array(), bp_get_version() );
     60
     61    wp_style_add_data( 'bp-mentions-css', 'rtl', true );
     62    if ( $min ) {
     63        wp_style_add_data( 'bp-mentions-css', 'suffix', $min );
     64    }
    5765
    5866    // Print a list of the current user's friends to the page for quicker @mentions lookups.
Note: See TracChangeset for help on using the changeset viewer.