From fefaf57d81ade9ecad015025d79a06591055abaa Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Wed, 22 Feb 2017 16:25:53 -0500 Subject: [PATCH] Changing some defines that were clashing with glm-client-info --- controllers/Admin.php | 14 +++++++------- glm-simple-messageboard.php | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/controllers/Admin.php b/controllers/Admin.php index 302eae1..9e5ac9e 100644 --- a/controllers/Admin.php +++ b/controllers/Admin.php @@ -55,8 +55,8 @@ class Glmsimplemessageboard_Admin_Controller { $roles = get_editable_roles(); foreach ($GLOBALS['wp_roles']->role_objects as $key => $role) { - if (isset($roles[$key]) && $role->has_cap(BUILT_IN_CAPABILITY)) { - $role->add_cap(GLM_NEW_CAPABILITY); + if (isset($roles[$key]) && $role->has_cap(GLM_SIMPLEMESSAGEBOARD_BUILT_IN_CAPABILITY)) { + $role->add_cap(GLM_SIMPLEMESSAGEBOARD_NEW_CAPABILITY); } } } @@ -65,8 +65,8 @@ class Glmsimplemessageboard_Admin_Controller { $roles = get_editable_roles(); foreach ($GLOBALS['wp_roles']->role_objects as $key => $role) { - if (isset($roles[$key]) && $role->has_cap(GLM_NEW_CAPABILITY)) { - $role->remove_cap(GLM_NEW_CAPABILITY); + if (isset($roles[$key]) && $role->has_cap(GLM_SIMPLEMESSAGEBOARD_NEW_CAPABILITY)) { + $role->remove_cap(GLM_SIMPLEMESSAGEBOARD_NEW_CAPABILITY); } } } @@ -81,7 +81,7 @@ class Glmsimplemessageboard_Admin_Controller add_menu_page( 'Gaslight Simple Messageboard', 'GLM Simple Messageboard', - GLM_NEW_CAPABILITY, + GLM_SIMPLEMESSAGEBOARD_NEW_CAPABILITY, 'glmsimplemessageboard', array($this, 'glmsimplemessageboard_options_page'), 'dashicons-id' @@ -194,12 +194,12 @@ class Glmsimplemessageboard_Admin_Controller public function glmsimplemessageboard_option_page_capability($capability) { - return GLM_NEW_CAPABILITY; + return GLM_SIMPLEMESSAGEBOARD_NEW_CAPABILITY; } public function glmsimplemessageboard_options_page() { - if (current_user_can(GLM_NEW_CAPABILITY)) { + if (current_user_can(GLM_SIMPLEMESSAGEBOARD_NEW_CAPABILITY)) { include $this->path . 'views/optionsPage.php'; } else { include $this->path . 'views/deniedAccess.php'; diff --git a/glm-simple-messageboard.php b/glm-simple-messageboard.php index 428a3c9..e028579 100644 --- a/glm-simple-messageboard.php +++ b/glm-simple-messageboard.php @@ -2,7 +2,7 @@ /** * Plugin Name: GLM Simple Messageboard * Description: Option Setting for displaying two fields; a name and a message - * Version: 1.0.6 + * Version: 1.0.7 * Author: Gaslight Media * Author URI: http://www.gaslightmedia.com * License: All right reserved @@ -45,8 +45,8 @@ */ define('GLM_SIMPLEMESSAGEBOARD_SETTINGS', 'glmsimplemessageboard_settings'); -define('GLM_NEW_CAPABILITY', 'glmsimplemessageboard_edit_messageboard'); -define('BUILT_IN_CAPABILITY', 'edit_posts'); +define('GLM_SIMPLEMESSAGEBOARD_NEW_CAPABILITY', 'glmsimplemessageboard_edit_messageboard'); +define('GLM_SIMPLEMESSAGEBOARD_GLM_SIMPLEMESSAGEBOARD_BUILT_IN_CAPABILITY', 'edit_posts'); register_activation_hook(__FILE__, array('Glmsimplemessageboard_Admin_Controller', 'activate_plugin')); register_deactivation_hook(__FILE__, array('Glmsimplemessageboard_Admin_Controller', 'deactivate_plugin')); -- 2.17.1