Plugin Directory

Changeset 1677102


Ignore:
Timestamp:
06/13/2017 12:22:11 AM (9 years ago)
Author:
cloughit
Message:

2.17.06.13

Location:
async-javascript/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • async-javascript/trunk/async-javascript.php

    r1652678 r1677102  
    55Plugin URI: https://cloughit.com.au/product/async-javascript/
    66Description: Async JavaScript adds a 'async' or 'defer' attribute to scripts loaded via wp_enqueue_script
    7 Version: 2.17.05.07
     7Version: 2.17.06.13
    88Author: Clough I.T. Solutions
    99Author URI: http://www.cloughit.com.au/
     
    2727    define( 'AJ_PLUGIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
    2828    define( 'AJ_PLUGIN_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
    29     define( 'AJ_VERSION', '2.17.05.07' );
     29    define( 'AJ_VERSION', '2.17.06.13' );
    3030    require_once( AJ_PLUGIN_DIR . 'lib/gtmetrix/class.Services_WTF_Test.php' );
    3131}
     
    6565add_action( 'wp_dashboard_setup', 'register_aj_dashboard_widget' );
    6666function register_aj_dashboard_widget() {
    67     global $wp_meta_boxes;
    68     wp_add_dashboard_widget(
    69         'aj_dashboard_widget',
    70         AJ_TITLE,
    71         'aj_dashboard_widget'
    72     );
    73     $dashboard = $wp_meta_boxes['dashboard']['normal']['core'];
    74     $my_widget = array( 'aj_dashboard_widget' => $dashboard['aj_dashboard_widget'] );
    75     unset( $dashboard['aj_dashboard_widget'] );
    76     $sorted_dashboard = array_merge( $my_widget, $dashboard );
    77     $wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard;
     67    if ( current_user_can( 'manage_options' ) ) {
     68        global $wp_meta_boxes;
     69        wp_add_dashboard_widget(
     70            'aj_dashboard_widget',
     71            AJ_TITLE,
     72            'aj_dashboard_widget'
     73        );
     74        $dashboard = $wp_meta_boxes['dashboard']['normal']['core'];
     75        $my_widget = array( 'aj_dashboard_widget' => $dashboard['aj_dashboard_widget'] );
     76        unset( $dashboard['aj_dashboard_widget'] );
     77        $sorted_dashboard = array_merge( $my_widget, $dashboard );
     78        $wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard;
     79    }
    7880}
    7981/**
     
    191193add_action( 'admin_notices', 'async_javascript_upgrade_notice' );
    192194function async_javascript_upgrade_notice() {
    193     if ( is_admin() ) {
     195    if ( is_admin() && current_user_can( 'manage_options' ) ) {
    194196        $options = array(
    195197            'timeout' => 10, //seconds
  • async-javascript/trunk/readme.txt

    r1652678 r1677102  
    44Tags: async,javascript,google,pagespeed,js,speed,performance,boost,render,blocking,above-the-fold
    55Requires at least: 2.8
    6 Tested up to: 4.7.4
    7 Stable tag: 2.17.05.07
     6Tested up to: 4.8
     7Stable tag: 2.17.06.13
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    102102== Changelog ==
    103103
     104= 2017.06.13 =
     105
     106* MOD: Dashboard Widget and Notices only available to Administrators
     107
    104108= 2.17.05.07 =
    105109
Note: See TracChangeset for help on using the changeset viewer.