Plugin Directory

Changeset 504461


Ignore:
Timestamp:
02/13/2012 08:44:02 PM (14 years ago)
Author:
briteweb
Message:

version 1.6.1

Location:
bw-less-css/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bw-less-css/trunk/bw_less_css.php

    r503375 r504461  
    33Plugin Name: #BW LESS-CSS
    44Plugin URI: http://support.briteweb.com/plugins/bw-less-css/
    5 Version: 1.6
     5Version: 1.6.1
    66Description: Helper plugin to compile and include LESS CSS files.
    77Author: #BRITEWEB
     
    1212
    1313define( 'BW_LESSCSS_SETTINGS_OPTION', 'bw_lesscss' );
    14 define( 'BW_LESSCSS_DB_VERSION', "1.6" );
     14define( 'BW_LESSCSS_DB_VERSION', "1.6.1" );
    1515
    1616global $bw_less_mobile_devices, $bw_less_options;
     
    9494    $defaults = array( 'media' => 'all', 'minify' => false, 'mobile' => false, 'hide_mobile' => false, 'force' => false );
    9595    extract( wp_parse_args( $args, $defaults ), EXTR_SKIP );
    96 
    97     if ( $mobile && ! BW_LESSCSS_IS_MOBILE && !$media ) return;
     96   
     97    if ( $mobile == 1 && ! BW_LESSCSS_IS_MOBILE ) return;
    9898    if ( $hide_mobile == 1 && !$mobile && BW_LESSCSS_IS_MOBILE ) return;
    99    
    100     if ( !is_admin() && !empty( $less ) ) {
     99    if ( is_admin() || empty( $less ) ) return;
    101100       
    102101        $output_name =  $less . '.css';
     102       
     103        $changed = false;
    103104        if ( file_exists( STYLESHEETPATH . '/' . $output_name ) && filemtime( STYLESHEETPATH . '/' . $less ) > filemtime( STYLESHEETPATH . '/' . $output_name ) ) $changed = true;
     105        if ( $force ) $changed = true;
    104106
    105107        try {
     
    121123        wp_enqueue_style( $name, get_bloginfo( 'stylesheet_directory' ) . '/' . $output_name, false, false, $media );
    122124       
    123     }
    124 
    125125}
    126126
     
    205205            <th scope="col">Media</th>
    206206            <th scope="col">…or Custom Media</th>
    207             <th scope="col">Mobile</th>
     207            <th scope="col">Mobile Only</th>
    208208            <th scope="col">Minify</th>
    209209            <th scope="col">Active</th>
     
    217217            <th scope="col">Media</th>
    218218            <th scope="col">…or Custom Media</th>
    219             <th scope="col">Mobile</th>
     219            <th scope="col">Mobile Only</th>
    220220            <th scope="col">Minify</th>
    221221            <th scope="col">Active</th>
  • bw-less-css/trunk/readme.txt

    r503375 r504461  
    5959== Changelog ==
    6060
     61= 1.6.1 =
     62* Mobile checkbox now includes stylesheet only on mobile devices (previously only worked if media field was empty)
     63
    6164= 1.6 =
    6265* Added option to hide non-mobile stylesheets on mobile devices
Note: See TracChangeset for help on using the changeset viewer.