--- /dev/null
+#toplevel_page_glm-members-admin-menu-members li.wp-first-item + li,
+#toplevel_page_glm-members-admin-menu-members li.wp-first-item + li + li
+{
+ display: none;
+}
+
* @link http://dev.gaslightmedia.com/
*/
-/**********************************************************************
- * NOTE: THIS IS A CONDITIONS FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to conditions, Conditions, or CONDITIONS to a name
- * appropriate for your new Add-On.
- *
- * This file is used to add main menus or sub-menus to the admin
- * area. If this add-on does not create additional menus, this file
- * should be omitted.
- *
- * If adding a main menu, use "add_menu_page()" WordPress function
- * instead and note any differences.
- *
- * The menu slug should be constructed as
- * "glm-members-admin-{page}-{action}"
- * The default action for a page is usually "index".
- *
- * Remove this message before using this file in production!
- **********************************************************************/
-
/*
* Added menus or sub-menus examples
*
function() {$this->controller('conditions');}
);
+$user = wp_get_current_user();
+if ( in_array( 'subscriber', (array) $user->roles ) ) {
+ if ( current_user_can( 'glm_members_edit_conditions' ) ) {
+ wp_enqueue_style('glmConditionsSubscriberAdminStyle', GLM_MEMBERS_CONDITIONS_PLUGIN_URL . 'css/subscriberAdmin.css' );
+ }
+}
* @link http://dev.gaslightmedia.com/
*/
-
-/**********************************************************************
- * NOTE: THIS IS A CONDITIONS FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to conditions, Conditions, or CONDITIONS to a name
- * appropriate for your new Add-On.
- *
- * This file is used to add permission checks that can be used throught
- * the main plugin and add-ons. If no such permissions are needed by
- * this add-on, this file should be omitted.
- *
- * Remove this message before using this file in production!
- **********************************************************************/
-
/*
* Below are permission checks for various specific things in this add-on and
* elsewhere in the Member DB main plugin and add-ons.
* @link http://dev.gaslightmedia.com/
*/
-/**********************************************************************
- * NOTE: THIS IS A CONDITIONS FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to conditions, Conditions, or CONDITIONS to a name
- * appropriate for your new Add-On.
- *
- * This file is used to add roles and capability. If none are required,
- * this file should be omitted.
- *
- * Remove this message before using this file in production!
- **********************************************************************/
-
/**
* NOTE: This file is only included in the activate.php process.
* It is not regularly used during operation.
*/
+
+$roles = get_editable_roles();
+foreach ($GLOBALS['wp_roles']->role_objects as $key => $role) {
+ if (isset($roles[$key]) && $role->has_cap('edit_posts')) {
+ $role->add_cap('glm_members_edit_conditions');
+ }
+}