WordPress.org

Plugin Directory

Changeset 1608511


Ignore:
Timestamp:
03/06/17 09:20:22 (6 months ago)
Author:
coffee2code
Message:

Release v1.3:

  • New: Load text domain for the plugin
  • Change: Use version() to set version for enqueued JS file
  • Change: Hook initialization to 'plugins_loaded' action
    • Add do_init() as the primary initializer hooked to 'plugins_loaded'
    • init() now just hooks 'plugins_loaded'; its contents moved into do_init()
  • Change: Prevent object instantiation
    • Add private __construct()
    • Add private __wakeup()
  • Change: Improve readme.txt (remove description of things that are no longer the case, minor tweaks, spacing)
  • Change: Unindent all the code for the class
  • Change: Note compatibility through WP 4.7+
  • Change: Remove support for WordPress older than 4.6 (should still work for earlier versions back to WP 3.8)
  • Change: Update copyright date (2017)
  • New: Add LICENSE file
Location:
notifications-for-collapsed-admin-menu
Files:
2 added
4 edited
4 copied

Legend:

Unmodified
Added
Removed
  • notifications-for-collapsed-admin-menu/tags/1.3/notifications-for-collapsed-admin-menu.js

    r404179 r1608511  
    11function c2c_maybe_highlight_comments_icon() { 
    2     var target = jQuery('#awaiting-mod:first .pending-count'); // WP < 3.2 
     2    var target = jQuery('.awaiting-mod:first .pending-count'); 
    33    if (! target.length) 
    4         target = jQuery('.awaiting-mod:first .pending-count'); 
     4        return; 
    55    var parent = target.parents('#menu-comments'); 
    66    var css_class = 'collapsed-with-pending'; 
    77    var i = target.text(); 
     8 
    89    i > 0 ? 
    9         parent.addClass(css_class).attr('title', i+' pending') : 
    10         parent.removeClass(css_class).attr('title', ''); 
     10        parent.addClass(css_class) : 
     11        parent.removeClass(css_class); 
    1112} 
    1213function c2c_maybe_highlight_plugins_icon() { 
  • notifications-for-collapsed-admin-menu/tags/1.3/notifications-for-collapsed-admin-menu.php

    r1395144 r1608511  
    22/** 
    33 * Plugin Name: Notifications for Collapsed Admin Menu 
    4  * Version:     1.2.2 
     4 * Version:     1.3 
    55 * Plugin URI:  http://coffee2code.com/wp-plugins/notifications-for-collapsed-admin-menu/ 
    66 * Author:      Scott Reilly 
     
    1111 * Description: Highlights the comments and plugins icons in the collapsed admin sidebar menu when notifications are pending. 
    1212 * 
    13  * Compatible with WordPress 2.8 through 4.5+. 
     13 * Compatible with WordPress 4.6 through 4.7+. 
    1414 * 
    1515 * =>> Read the accompanying readme.txt file for instructions and documentation. 
     
    1919 * @package Notifications_for_Collapsed_Admin_Menu 
    2020 * @author  Scott Reilly 
    21  * @version 1.2.2 
     21 * @version 1.3 
    2222 */ 
    2323 
     
    2525 * TODO: 
    2626 * - Explore other methods of notification (i.e. numeric count) 
     27 * - Add unit tests 
    2728 */ 
    2829 
    2930/* 
    30     Copyright (c) 2010-2016 by Scott Reilly (aka coffee2code) 
     31    Copyright (c) 2010-2017 by Scott Reilly (aka coffee2code) 
    3132 
    3233    This program is free software; you can redistribute it and/or 
     
    4950if ( is_admin() && ! class_exists( 'c2c_NotificationsForCollapsedAdminMenu' ) ) : 
    5051 
    51     class c2c_NotificationsForCollapsedAdminMenu { 
     52class c2c_NotificationsForCollapsedAdminMenu { 
    5253 
    53         /** 
    54          * Returns version of the plugin. 
    55          * 
    56          * @since 1.1.1 
    57          */ 
    58         public static function version() { 
    59             return '1.2.2'; 
     54    /** 
     55     * Prevent instantiation. 
     56     * 
     57     * @since 1.3 
     58     */ 
     59    private function __construct() {} 
     60 
     61    /** 
     62     * Prevent unserializing an instance. 
     63     * 
     64     * @since 1.3 
     65     */ 
     66    private function __wakeup() {} 
     67 
     68    /** 
     69     * Returns version of the plugin. 
     70     * 
     71     * @since 1.1.1 
     72     */ 
     73    public static function version() { 
     74        return '1.3'; 
     75    } 
     76 
     77    /** 
     78     * Initializes the plugin. 
     79     */ 
     80    public static function init() { 
     81        add_action( 'plugins_loaded', array( __CLASS__, 'do_init' ) ); 
     82    } 
     83 
     84    /** 
     85     * Performs actual initialization tasks. 
     86     * 
     87     * @since 1.3 
     88     */ 
     89    public static function do_init() { 
     90        // Load textdomain. 
     91        load_plugin_textdomain( 'notifications-for-collapsed-admin-menu' ); 
     92 
     93        // Register hooks. 
     94        add_action( 'admin_enqueue_scripts', array( __CLASS__, 'add_css' ) ); 
     95        add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_js' ) ); 
     96    } 
     97 
     98    /** 
     99     * Echoes CSS within style tag. 
     100     */ 
     101    public static function add_css() { 
     102        global $wp_version; 
     103 
     104        $admin_color = get_user_option( 'admin_color' ); 
     105 
     106        switch ( $admin_color ) { 
     107            case 'fresh': 
     108                $default_color = '#444'; 
     109                break; 
     110            case 'light': 
     111                $default_color = '#ccc'; 
     112                break; 
     113            default: 
     114                $default_color = '#7c7976'; 
    60115        } 
    61116 
    62         /** 
    63          * Initialization (primarily hooking actions). 
    64          */ 
    65         public static function init() { 
    66             add_action( 'admin_enqueue_scripts', array( __CLASS__, 'add_css' ) ); 
    67             add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_js' ) ); 
     117        $color = apply_filters( 'c2c_collapsed_admin_menu_icon_highlight_color', $default_color ); 
     118 
     119        echo <<<HTML 
     120        <style type="text/css"> 
     121        .folded #adminmenu li.collapsed-with-pending { 
     122            background-color:$color; 
     123            border-left-color:$color; 
     124            border-right-color:$color; 
    68125        } 
    69  
    70         /** 
    71          * Echoes CSS within style tag. 
    72          */ 
    73         public static function add_css() { 
    74             global $wp_version; 
    75  
    76             $admin_color = get_user_option( 'admin_color' ); 
    77  
    78             if ( version_compare( $wp_version, '3.7.99', '>' ) ) { 
    79                 switch ( $admin_color ) { 
    80                     case 'fresh': 
    81                         $default_color = '#444'; 
    82                         break; 
    83                     case 'light': 
    84                         $default_color = '#ccc'; 
    85                         break; 
    86                     default: 
    87                         $default_color = '#7c7976'; 
    88                 } 
    89             } elseif ( version_compare( $wp_version, '3.1.99', '>' ) ) { 
    90                 $default_color = $admin_color == 'fresh' ? '#7c7976' : '#5589aa'; 
    91             } elseif ( version_compare( $wp_version, '2.9.99', '>' ) ) { 
    92                 $default_color = $admin_color == 'fresh' ? '#787878' : '#e66f00'; 
    93             } else { 
    94                 $default_color = '#e66f00'; 
    95             } 
    96  
    97             $color = apply_filters( 'c2c_collapsed_admin_menu_icon_highlight_color', $default_color ); 
    98  
    99             echo <<<HTML 
    100             <style type="text/css"> 
    101             .folded #adminmenu li.collapsed-with-pending { 
    102                 background-color:$color; 
    103                 border-left-color:$color; 
    104                 border-right-color:$color; 
    105             } 
    106             </style> 
     126        </style> 
    107127 
    108128HTML; 
    109         } 
     129    } 
    110130 
    111         /** 
    112          * Enqueues javascript. 
    113          */ 
    114         public static function enqueue_js() { 
    115             $base = 'notifications-for-collapsed-admin-menu'; 
    116             wp_enqueue_script( $base, plugins_url( $base . '.js', __FILE__ ), array( 'jquery' ), '1.0', true ); 
    117         } 
     131    /** 
     132     * Enqueues javascript. 
     133     */ 
     134    public static function enqueue_js() { 
     135        $base = 'notifications-for-collapsed-admin-menu'; 
     136        wp_enqueue_script( $base, plugins_url( $base . '.js', __FILE__ ), array( 'jquery' ), self::version(), true ); 
    118137    } 
    119     c2c_NotificationsForCollapsedAdminMenu::init(); 
    120138 
    121 endif; 
     139} // end c2c_NotificationsForCollapsedAdminMenu 
     140 
     141c2c_NotificationsForCollapsedAdminMenu::init(); 
     142 
     143endif; // end if !class_exists() 
  • notifications-for-collapsed-admin-menu/tags/1.3/readme.txt

    r1395144 r1608511  
    55License: GPLv2 or later 
    66License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    7 Requires at least: 2.8 
    8 Tested up to: 4.5 
    9 Stable tag: 1.2.2 
     7Requires at least: 4.6 
     8Tested up to: 4.7 
     9Stable tag: 1.3 
    1010 
    1111Highlights the comments and plugins icons in the collapsed admin sidebar menu when notifications are pending. 
     
    1616In the WordPress admin, when the left sidebar menu is expanded WordPress presents you with a highlighted number within the menu itself indicating the number of pending comments (i.e. comments in moderation) and a separate number for the number of plugins with updates. 
    1717 
    18 However, if you collapse the sidebar menu, then there are *no* visual indications that either types of updates are available.  You can view the count of updated plugins by hovering on the plugins icon, but you must manually do that to learn of updates.  No such hovering count exists for the comments icon, so the only ways to find out about pending comments are to visit the dashboard, visit the comments admin page, or expand the menu 
     18However, if you collapse the sidebar menu, then there are *no* visual indications that either types of updates are available. You can view the count of updated plugins by hovering on the plugins icon (or, for comments, by hovering on the comments icon), but you must manually do that to learn of updates. 
    1919 
    20 This plugin enhances the sidebar menu to display a visual indication that comments are in moderation and/or there are plugin updates available.  It does so by using a different colored background for the icon (see the screenshot).  Additionally, if you hover over the comments icon, it will indicate the count of pending comments.  (The plugins icon already provides a count of updated plugins when you hover over it.) The visual indication is also updated when AJAX-based requests are made (so doing an in-line approval of the last pending comment will cause the comments icon background color to return to its non-highlighted color). 
     20This plugin enhances the sidebar menu to display a visual indication that comments are in moderation and/or there are plugin updates available. It does so by using a different-colored background for the icon (see the screenshot). The visual indication is also updated when AJAX-based requests are made (so doing an in-line approval of the last pending comment will cause the comments icon background color to return to its non-highlighted color). 
    2121 
    22 By default, the plugin utilizes WordPress's pending/update count background highlight color, which for WP 2.8/2.9 is #e66f00 and for WP 3.0 is #787875. 
     22By default, the plugin utilizes WordPress's pending/update count background highlight color, which varies depending on the admin color scheme in use by the user. 
    2323 
    24 *NOTE:* As the plugin's name suggests, this plugin only takes effect if the admin sidebar menu is collapsed.  Also, the admin user must have JavaScript enabled. 
     24*NOTE:* As the plugin's name suggests, this plugin only takes effect if the admin sidebar menu is collapsed. Also, the admin user must have JavaScript enabled. 
    2525 
    2626Links: [Plugin Homepage](http://coffee2code.com/wp-plugins/notifications-for-collapsed-admin-menu/) | [Plugin Directory Page](https://wordpress.org/plugins/notifications-for-collapsed-admin-menu/) | [Author Homepage](http://coffee2code.com) 
     
    2929== Installation == 
    3030 
    31 1. Download the file notifications-for-collapsed-admin-menu.zip and unzip it into your /wp-content/plugins/ directory (or install via the built-in WordPress plugin installer). 
    32 1. Activate the plugin through the 'Plugins' admin menu in WordPress 
     311. Install via the built-in WordPress plugin installer. Or download and unzip `notifications-for-collapsed-admin-menu.zip` inside the plugins directory for your site (typically `wp-content/plugins/`) 
     322. Activate the plugin through the 'Plugins' admin menu in WordPress 
    3333 
    3434 
     
    4141= Can I change the background color used to highlight the comments/plugins icons? = 
    4242 
    43 You can customize the background color used by applying a filter to 'c2c_collapsed_admin_menu_icon_highlight_color'.  For example, in your theme's functions.php file, you can add this line (but replace "#f5f500" with the color you want): 
     43Yes. You can customize the background color used by applying a filter to 'c2c_collapsed_admin_menu_icon_highlight_color'. For example, in your theme's functions.php file, you can add this line (but replace "#9932CC" with the color you want): 
    4444 
    45 `add_filter( 'c2c_collapsed_admin_menu_icon_highlight_color', create_function( '', 'return "#f5f500";' ) );` 
     45`add_filter( 'c2c_collapsed_admin_menu_icon_highlight_color', function( $color ) { return "#9932CC"; } );` 
    4646 
    4747 
     
    5252 
    5353== Changelog == 
     54 
     55= 1.3 (2017-02-23) = 
     56* New: Load text domain for the plugin 
     57* Change: Use `version()` to set version for enqueued JS file 
     58* Change: Hook initialization to 'plugins_loaded' action 
     59    * Add `do_init()` as the primary initializer hooked to 'plugins_loaded' 
     60    * `init()` now just hooks 'plugins_loaded'; its contents moved into `do_init()` 
     61* Change: Prevent object instantiation 
     62    * Add private `__construct()` 
     63    * Add private `__wakeup()` 
     64* Change: Improve readme.txt (remove description of things that are no longer the case, minor tweaks, spacing) 
     65* Change: Unindent all the code for the class 
     66* Change: Note compatibility through WP 4.7+ 
     67* Change: Remove support for WordPress older than 4.6 (should still work for earlier versions back to WP 3.8) 
     68* Change: Update copyright date (2017) 
     69* New: Add LICENSE file 
    5470 
    5571= 1.2.2 (2016-01-30) = 
     
    120136== Upgrade Notice == 
    121137 
     138= 1.3 = 
     139Minor update: noted compatibility through WP 4.7+, dropped compatibility with version of WP older than 4.6, updated copyright date (2017), and other minor back-end tweaks 
     140 
    122141= 1.2.2 = 
    123142Trivial update: noted compatibility through WP 4.4+ and updated copyright date (2016) 
  • notifications-for-collapsed-admin-menu/trunk/notifications-for-collapsed-admin-menu.js

    r404179 r1608511  
    11function c2c_maybe_highlight_comments_icon() { 
    2     var target = jQuery('#awaiting-mod:first .pending-count'); // WP < 3.2 
     2    var target = jQuery('.awaiting-mod:first .pending-count'); 
    33    if (! target.length) 
    4         target = jQuery('.awaiting-mod:first .pending-count'); 
     4        return; 
    55    var parent = target.parents('#menu-comments'); 
    66    var css_class = 'collapsed-with-pending'; 
    77    var i = target.text(); 
     8 
    89    i > 0 ? 
    9         parent.addClass(css_class).attr('title', i+' pending') : 
    10         parent.removeClass(css_class).attr('title', ''); 
     10        parent.addClass(css_class) : 
     11        parent.removeClass(css_class); 
    1112} 
    1213function c2c_maybe_highlight_plugins_icon() { 
  • notifications-for-collapsed-admin-menu/trunk/notifications-for-collapsed-admin-menu.php

    r1395144 r1608511  
    22/** 
    33 * Plugin Name: Notifications for Collapsed Admin Menu 
    4  * Version:     1.2.2 
     4 * Version:     1.3 
    55 * Plugin URI:  http://coffee2code.com/wp-plugins/notifications-for-collapsed-admin-menu/ 
    66 * Author:      Scott Reilly 
     
    1111 * Description: Highlights the comments and plugins icons in the collapsed admin sidebar menu when notifications are pending. 
    1212 * 
    13  * Compatible with WordPress 2.8 through 4.5+. 
     13 * Compatible with WordPress 4.6 through 4.7+. 
    1414 * 
    1515 * =>> Read the accompanying readme.txt file for instructions and documentation. 
     
    1919 * @package Notifications_for_Collapsed_Admin_Menu 
    2020 * @author  Scott Reilly 
    21  * @version 1.2.2 
     21 * @version 1.3 
    2222 */ 
    2323 
     
    2525 * TODO: 
    2626 * - Explore other methods of notification (i.e. numeric count) 
     27 * - Add unit tests 
    2728 */ 
    2829 
    2930/* 
    30     Copyright (c) 2010-2016 by Scott Reilly (aka coffee2code) 
     31    Copyright (c) 2010-2017 by Scott Reilly (aka coffee2code) 
    3132 
    3233    This program is free software; you can redistribute it and/or 
     
    4950if ( is_admin() && ! class_exists( 'c2c_NotificationsForCollapsedAdminMenu' ) ) : 
    5051 
    51     class c2c_NotificationsForCollapsedAdminMenu { 
     52class c2c_NotificationsForCollapsedAdminMenu { 
    5253 
    53         /** 
    54          * Returns version of the plugin. 
    55          * 
    56          * @since 1.1.1 
    57          */ 
    58         public static function version() { 
    59             return '1.2.2'; 
     54    /** 
     55     * Prevent instantiation. 
     56     * 
     57     * @since 1.3 
     58     */ 
     59    private function __construct() {} 
     60 
     61    /** 
     62     * Prevent unserializing an instance. 
     63     * 
     64     * @since 1.3 
     65     */ 
     66    private function __wakeup() {} 
     67 
     68    /** 
     69     * Returns version of the plugin. 
     70     * 
     71     * @since 1.1.1 
     72     */ 
     73    public static function version() { 
     74        return '1.3'; 
     75    } 
     76 
     77    /** 
     78     * Initializes the plugin. 
     79     */ 
     80    public static function init() { 
     81        add_action( 'plugins_loaded', array( __CLASS__, 'do_init' ) ); 
     82    } 
     83 
     84    /** 
     85     * Performs actual initialization tasks. 
     86     * 
     87     * @since 1.3 
     88     */ 
     89    public static function do_init() { 
     90        // Load textdomain. 
     91        load_plugin_textdomain( 'notifications-for-collapsed-admin-menu' ); 
     92 
     93        // Register hooks. 
     94        add_action( 'admin_enqueue_scripts', array( __CLASS__, 'add_css' ) ); 
     95        add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_js' ) ); 
     96    } 
     97 
     98    /** 
     99     * Echoes CSS within style tag. 
     100     */ 
     101    public static function add_css() { 
     102        global $wp_version; 
     103 
     104        $admin_color = get_user_option( 'admin_color' ); 
     105 
     106        switch ( $admin_color ) { 
     107            case 'fresh': 
     108                $default_color = '#444'; 
     109                break; 
     110            case 'light': 
     111                $default_color = '#ccc'; 
     112                break; 
     113            default: 
     114                $default_color = '#7c7976'; 
    60115        } 
    61116 
    62         /** 
    63          * Initialization (primarily hooking actions). 
    64          */ 
    65         public static function init() { 
    66             add_action( 'admin_enqueue_scripts', array( __CLASS__, 'add_css' ) ); 
    67             add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_js' ) ); 
     117        $color = apply_filters( 'c2c_collapsed_admin_menu_icon_highlight_color', $default_color ); 
     118 
     119        echo <<<HTML 
     120        <style type="text/css"> 
     121        .folded #adminmenu li.collapsed-with-pending { 
     122            background-color:$color; 
     123            border-left-color:$color; 
     124            border-right-color:$color; 
    68125        } 
    69  
    70         /** 
    71          * Echoes CSS within style tag. 
    72          */ 
    73         public static function add_css() { 
    74             global $wp_version; 
    75  
    76             $admin_color = get_user_option( 'admin_color' ); 
    77  
    78             if ( version_compare( $wp_version, '3.7.99', '>' ) ) { 
    79                 switch ( $admin_color ) { 
    80                     case 'fresh': 
    81                         $default_color = '#444'; 
    82                         break; 
    83                     case 'light': 
    84                         $default_color = '#ccc'; 
    85                         break; 
    86                     default: 
    87                         $default_color = '#7c7976'; 
    88                 } 
    89             } elseif ( version_compare( $wp_version, '3.1.99', '>' ) ) { 
    90                 $default_color = $admin_color == 'fresh' ? '#7c7976' : '#5589aa'; 
    91             } elseif ( version_compare( $wp_version, '2.9.99', '>' ) ) { 
    92                 $default_color = $admin_color == 'fresh' ? '#787878' : '#e66f00'; 
    93             } else { 
    94                 $default_color = '#e66f00'; 
    95             } 
    96  
    97             $color = apply_filters( 'c2c_collapsed_admin_menu_icon_highlight_color', $default_color ); 
    98  
    99             echo <<<HTML 
    100             <style type="text/css"> 
    101             .folded #adminmenu li.collapsed-with-pending { 
    102                 background-color:$color; 
    103                 border-left-color:$color; 
    104                 border-right-color:$color; 
    105             } 
    106             </style> 
     126        </style> 
    107127 
    108128HTML; 
    109         } 
     129    } 
    110130 
    111         /** 
    112          * Enqueues javascript. 
    113          */ 
    114         public static function enqueue_js() { 
    115             $base = 'notifications-for-collapsed-admin-menu'; 
    116             wp_enqueue_script( $base, plugins_url( $base . '.js', __FILE__ ), array( 'jquery' ), '1.0', true ); 
    117         } 
     131    /** 
     132     * Enqueues javascript. 
     133     */ 
     134    public static function enqueue_js() { 
     135        $base = 'notifications-for-collapsed-admin-menu'; 
     136        wp_enqueue_script( $base, plugins_url( $base . '.js', __FILE__ ), array( 'jquery' ), self::version(), true ); 
    118137    } 
    119     c2c_NotificationsForCollapsedAdminMenu::init(); 
    120138 
    121 endif; 
     139} // end c2c_NotificationsForCollapsedAdminMenu 
     140 
     141c2c_NotificationsForCollapsedAdminMenu::init(); 
     142 
     143endif; // end if !class_exists() 
  • notifications-for-collapsed-admin-menu/trunk/readme.txt

    r1395144 r1608511  
    55License: GPLv2 or later 
    66License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    7 Requires at least: 2.8 
    8 Tested up to: 4.5 
    9 Stable tag: 1.2.2 
     7Requires at least: 4.6 
     8Tested up to: 4.7 
     9Stable tag: 1.3 
    1010 
    1111Highlights the comments and plugins icons in the collapsed admin sidebar menu when notifications are pending. 
     
    1616In the WordPress admin, when the left sidebar menu is expanded WordPress presents you with a highlighted number within the menu itself indicating the number of pending comments (i.e. comments in moderation) and a separate number for the number of plugins with updates. 
    1717 
    18 However, if you collapse the sidebar menu, then there are *no* visual indications that either types of updates are available.  You can view the count of updated plugins by hovering on the plugins icon, but you must manually do that to learn of updates.  No such hovering count exists for the comments icon, so the only ways to find out about pending comments are to visit the dashboard, visit the comments admin page, or expand the menu 
     18However, if you collapse the sidebar menu, then there are *no* visual indications that either types of updates are available. You can view the count of updated plugins by hovering on the plugins icon (or, for comments, by hovering on the comments icon), but you must manually do that to learn of updates. 
    1919 
    20 This plugin enhances the sidebar menu to display a visual indication that comments are in moderation and/or there are plugin updates available.  It does so by using a different colored background for the icon (see the screenshot).  Additionally, if you hover over the comments icon, it will indicate the count of pending comments.  (The plugins icon already provides a count of updated plugins when you hover over it.) The visual indication is also updated when AJAX-based requests are made (so doing an in-line approval of the last pending comment will cause the comments icon background color to return to its non-highlighted color). 
     20This plugin enhances the sidebar menu to display a visual indication that comments are in moderation and/or there are plugin updates available. It does so by using a different-colored background for the icon (see the screenshot). The visual indication is also updated when AJAX-based requests are made (so doing an in-line approval of the last pending comment will cause the comments icon background color to return to its non-highlighted color). 
    2121 
    22 By default, the plugin utilizes WordPress's pending/update count background highlight color, which for WP 2.8/2.9 is #e66f00 and for WP 3.0 is #787875. 
     22By default, the plugin utilizes WordPress's pending/update count background highlight color, which varies depending on the admin color scheme in use by the user. 
    2323 
    24 *NOTE:* As the plugin's name suggests, this plugin only takes effect if the admin sidebar menu is collapsed.  Also, the admin user must have JavaScript enabled. 
     24*NOTE:* As the plugin's name suggests, this plugin only takes effect if the admin sidebar menu is collapsed. Also, the admin user must have JavaScript enabled. 
    2525 
    2626Links: [Plugin Homepage](http://coffee2code.com/wp-plugins/notifications-for-collapsed-admin-menu/) | [Plugin Directory Page](https://wordpress.org/plugins/notifications-for-collapsed-admin-menu/) | [Author Homepage](http://coffee2code.com) 
     
    2929== Installation == 
    3030 
    31 1. Download the file notifications-for-collapsed-admin-menu.zip and unzip it into your /wp-content/plugins/ directory (or install via the built-in WordPress plugin installer). 
    32 1. Activate the plugin through the 'Plugins' admin menu in WordPress 
     311. Install via the built-in WordPress plugin installer. Or download and unzip `notifications-for-collapsed-admin-menu.zip` inside the plugins directory for your site (typically `wp-content/plugins/`) 
     322. Activate the plugin through the 'Plugins' admin menu in WordPress 
    3333 
    3434 
     
    4141= Can I change the background color used to highlight the comments/plugins icons? = 
    4242 
    43 You can customize the background color used by applying a filter to 'c2c_collapsed_admin_menu_icon_highlight_color'.  For example, in your theme's functions.php file, you can add this line (but replace "#f5f500" with the color you want): 
     43Yes. You can customize the background color used by applying a filter to 'c2c_collapsed_admin_menu_icon_highlight_color'. For example, in your theme's functions.php file, you can add this line (but replace "#9932CC" with the color you want): 
    4444 
    45 `add_filter( 'c2c_collapsed_admin_menu_icon_highlight_color', create_function( '', 'return "#f5f500";' ) );` 
     45`add_filter( 'c2c_collapsed_admin_menu_icon_highlight_color', function( $color ) { return "#9932CC"; } );` 
    4646 
    4747 
     
    5252 
    5353== Changelog == 
     54 
     55= 1.3 (2017-02-23) = 
     56* New: Load text domain for the plugin 
     57* Change: Use `version()` to set version for enqueued JS file 
     58* Change: Hook initialization to 'plugins_loaded' action 
     59    * Add `do_init()` as the primary initializer hooked to 'plugins_loaded' 
     60    * `init()` now just hooks 'plugins_loaded'; its contents moved into `do_init()` 
     61* Change: Prevent object instantiation 
     62    * Add private `__construct()` 
     63    * Add private `__wakeup()` 
     64* Change: Improve readme.txt (remove description of things that are no longer the case, minor tweaks, spacing) 
     65* Change: Unindent all the code for the class 
     66* Change: Note compatibility through WP 4.7+ 
     67* Change: Remove support for WordPress older than 4.6 (should still work for earlier versions back to WP 3.8) 
     68* Change: Update copyright date (2017) 
     69* New: Add LICENSE file 
    5470 
    5571= 1.2.2 (2016-01-30) = 
     
    120136== Upgrade Notice == 
    121137 
     138= 1.3 = 
     139Minor update: noted compatibility through WP 4.7+, dropped compatibility with version of WP older than 4.6, updated copyright date (2017), and other minor back-end tweaks 
     140 
    122141= 1.2.2 = 
    123142Trivial update: noted compatibility through WP 4.4+ and updated copyright date (2016) 
Note: See TracChangeset for help on using the changeset viewer.