Plugin Directory

Changeset 919717


Ignore:
Timestamp:
05/23/2014 02:09:05 AM (12 years ago)
Author:
WebMaestro.Fr
Message:

Icon and Admin notice

Location:
less-compiler
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • less-compiler/trunk/plugin.php

    r912476 r919717  
    66Author URI: http://webmaestro.fr
    77Description: Less Compiler for Wordpress
    8 Version: 1.2.1
     8Version: 1.2.2
    99License: GNU General Public License
    1010License URI: license.txt
     
    6868            'parent' => false,
    6969            'title' => __( 'LESS', 'wm-less' ),
    70             'icon_url' => 'dashicons-art',
     70            'icon_url' => plugin_dir_url( __FILE__ ) . 'img/menu-icon.png',
    7171        ), array(
    7272            'less' => array(
     
    119119    }
    120120
     121    public static function cache_permissions_notice() { ?>
     122    <div id="setting-error-cache_permissions" class="updated settings-error" style="border-left-color: #ffba00;">
     123            <p><strong><?php echo sprintf( __( 'The cache directory (<code>%s</code>) is not writable. No big deal, but caching would make the compiling step a bit smoother.', 'wm-less' ), plugin_dir_path( __FILE__ ) . 'cache' ); ?></strong></p>
     124        </div>
     125    <?php }
     126
    121127    public static function compile()
    122128    {
     
    125131            $cache_dir = plugin_dir_path( __FILE__ ) . 'cache';
    126132            if ( ! is_writable( $cache_dir ) ) {
    127                 add_settings_error( 'less_compiler', 'cache_permissions', sprintf( __( 'The cache directory (<code>%s</code>) is not writable. No big deal, but caching would make the compiling step a bit smoother.', 'wm-less' ), $cache_dir ), 'error' );
     133                add_action( 'admin_notices', array( __CLASS__, 'cache_permissions_notice' ) );
    128134            }
    129135            $parser = new Less_Parser( array(
Note: See TracChangeset for help on using the changeset viewer.