Changing some defines that were clashing with glm-client-info
authorLaury GvR <laury@gaslightmedia.com>
Wed, 22 Feb 2017 21:25:53 +0000 (16:25 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 22 Feb 2017 21:25:53 +0000 (16:25 -0500)
controllers/Admin.php
glm-simple-messageboard.php

index 302eae1..9e5ac9e 100644 (file)
@@ -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';
index 428a3c9..e028579 100644 (file)
@@ -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'));