Skip to:
Content

bbPress.org

Changeset 5289


Ignore:
Timestamp:
02/19/2014 12:09:56 AM (9 years ago)
Author:
johnjamesjacoby
Message:

More grunt updates:

  • Add RTL, minified and SCRIPT_DEBUG support for bbPress admin CSS.
  • Add RTL, minified and SCRIPT_DEBUG support for bbPress default theme-compat CSS.
  • RTL bbPress CSS is now compiled with cssjanus. (bbpress-rtl.css file removed)
  • Props netweb. See #2542.
Location:
trunk/src
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/admin.php

    r5285 r5289  
    586586     */
    587587    public function enqueue_styles() {
    588         wp_enqueue_style( 'bbp-admin-css', $this->css_url . 'admin.css', array( 'dashicons' ), bbp_get_version() );
     588
     589        // RTL and/or minified
     590        $suffix  = is_rtl() ? '-rtl' : '';
     591        $suffix .= defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     592
     593        // Enqueue admin CSS with dashicons dependency
     594        wp_enqueue_style( 'bbp-admin-css', $this->css_url . 'admin' . $suffix . '.css', array( 'dashicons' ), bbp_get_version() );
    589595    }
    590596
  • trunk/src/templates/default/bbpress-functions.php

    r5285 r5289  
    127127    public function enqueue_styles() {
    128128
    129         // Setup styles array
    130         $styles = array();
    131 
    132         // LTR
    133         $styles['bbp-default'] = array(
    134             'file'         => 'css/bbpress.css',
    135             'dependencies' => array()
    136         );
    137 
    138         // RTL helpers
    139         if ( is_rtl() ) {
    140             $styles['bbp-default-rtl'] = array(
    141                 'file'         => 'css/bbpress-rtl.css',
    142                 'dependencies' => array( 'bbp-default' )
    143             );
    144         }
    145 
    146         // Filter the scripts
    147         $styles = apply_filters( 'bbp_default_styles', $styles );
     129        // RTL and/or minified
     130        $suffix  = is_rtl() ? '-rtl' : '';
     131        $suffix .= defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     132
     133        // Get and filter the bbp-default style
     134        $styles = apply_filters( 'bbp_default_styles', array(
     135            'bbp-default' => array(
     136                'file'         => 'css/bbpress' . $suffix . '.css',
     137                'dependencies' => array()
     138            )
     139        ) );
    148140
    149141        // Enqueue the styles
Note: See TracChangeset for help on using the changeset viewer.