-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
Description
In the event that a User wants to have a User Role that is basically Administrator but without the ability to access Client Dash stuff, this will allow them to clone the Administrator Role but remove the Client Dash-related Capabilities.
Currently only the Client Dash Settings page has its own Capability. The others all use manage_options.
client-dash/core/plugin-pages/class-clientdash-pluginpages.php
Lines 152 to 216 in 17c838d
| /** | |
| * Adds the sub-menu item to the toolbar. | |
| * | |
| * @since 2.0.0 | |
| * @access private | |
| */ | |
| function add_pages() { | |
| global $submenu; | |
| add_menu_page( | |
| __( 'Client Dash', 'client-dash' ), | |
| __( 'Client Dash', 'client-dash' ), | |
| 'manage_options', | |
| 'clientdash', | |
| null, | |
| 'dashicons-admin-generic', | |
| 100 | |
| ); | |
| add_submenu_page( | |
| 'clientdash', | |
| __( 'Admin Page', 'client-dash' ), | |
| __( 'Admin Page', 'client-dash' ), | |
| 'manage_options', | |
| 'clientdash_admin_page', | |
| array( __CLASS__, 'load_admin_page' ) | |
| ); | |
| add_submenu_page( | |
| 'clientdash', | |
| __( 'Helper Pages', 'client-dash' ), | |
| __( 'Helper Pages', 'client-dash' ), | |
| 'manage_options', | |
| 'clientdash_helper_pages', | |
| array( __CLASS__, 'load_helper_pages' ) | |
| ); | |
| add_submenu_page( | |
| 'clientdash', | |
| __( 'Settings', 'client-dash' ), | |
| __( 'Settings', 'client-dash' ), | |
| 'manage_options', | |
| 'clientdash_settings', | |
| array( __CLASS__, 'load_settings' ) | |
| ); | |
| add_submenu_page( | |
| 'clientdash', | |
| __( 'Addons', 'client-dash' ), | |
| __( 'Addons', 'client-dash' ), | |
| 'manage_options', | |
| 'clientdash_addons', | |
| array( __CLASS__, 'load_addons' ) | |
| ); | |
| if ( current_user_can( 'manage_options' ) ) { | |
| $submenu['clientdash'][0] = array( | |
| __( 'Customize Admin', 'client-dash' ), | |
| 'customize_admin', | |
| site_url( '/?clientdash_customize=1' ), | |
| ); | |
| } | |
| } |