From eda4adc206235d351a58d4b7b24dcbb97e6fd714 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Tue, 5 Feb 2019 16:04:30 -0500 Subject: [PATCH] Notification Menu now follows notifications management flag --- index.php | 6 +++--- readme.txt | 3 +++ setup/adminMenus.php | 26 +++++++++++++------------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/index.php b/index.php index 3329506..ba9e8c5 100755 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: GLM Bandwidth * Plugin URI: http://www.gaslightmedia.com/ * Description: Gaslight Media Website Bandwidth Display and Reporting - * Version: 2.3.0 + * Version: 2.3.1 * Author: Gaslight Media * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -19,7 +19,7 @@ * @package glmServerStats * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 2.3.0 + * @version 2.3.1 */ // Check that we're being called by WordPress. @@ -28,7 +28,7 @@ if (!defined('ABSPATH')) { die(); } -define('GLM_SERVERSTATS_PLUGIN_VERSION', '2.3.0'); +define('GLM_SERVERSTATS_PLUGIN_VERSION', '2.3.1'); // Required to be able to get user capabilities when being called as a filter from the main plugin require_once ABSPATH . 'wp-includes/pluggable.php'; diff --git a/readme.txt b/readme.txt index 0644f6e..3ccbf96 100755 --- a/readme.txt +++ b/readme.txt @@ -29,6 +29,9 @@ e.g. 1. Activate the plugin through the 'Plugins' menu in WordPress == Changelog == += 2.3.1 = +* Notification Menu now follows notifications management flag + = 2.3.0 = Updated location and appearance of cookie pop-up. diff --git a/setup/adminMenus.php b/setup/adminMenus.php index a6e1216..04911bb 100755 --- a/setup/adminMenus.php +++ b/setup/adminMenus.php @@ -64,18 +64,18 @@ if (current_user_can('editor') || current_user_can('administrator')) { } -/* Tempoorarily re enabled -*/ - add_menu_page( - 'GLM Notifications', - 'GLM Notifications', - 'edit_pages', - 'glm-info-main-menu', - function(){ - serverStatsController('glmInfoNotifications'); - }, - GLM_SERVERSTATS_PLUGIN_ASSETS_URL.'/flame.png', - '3.200' - ); + if ($serverstatsConfig['show_notifications']) { + add_menu_page( + 'GLM Notifications', + 'GLM Notifications', + 'edit_pages', + 'glm-info-main-menu', + function(){ + serverStatsController('glmInfoNotifications'); + }, + GLM_SERVERSTATS_PLUGIN_ASSETS_URL.'/flame.png', + '3.200' + ); + } } -- 2.17.1