access problems for administrator in multisite
-
The panel has a submenu plugin has a call options.
This item is only shown for network administrators.
In the code it blocks so that the subscribers cannot access this option, but being multisite it does not work correctly.
$tools_capability=get_option(‘newstatpress_menutools_cap’) ;
if(!$tools_capability) //default value
$tools_capability=$nsp_option_vars[‘menutools_cap’][‘value’];$options_capability=get_option(‘newstatpress_menuoptions_cap’) ;
// var_dump($options_capability);
if(!$options_capability) //default value//var_dump($nsp_option_vars);
$options_capability=$nsp_option_vars[‘menuoptions_cap’][‘value’];$credits_capability=$nsp_option_vars[‘menucredits_cap’][‘value’];
// Display menu with personalized capabilities if user IS NOT “subscriber”
/* if ( user_can( $current_user, “edit_posts” ) ) {*/
add_menu_page(‘NewStatPres’, ‘NewStatPress’, $capability, ‘nsp-main’, ‘nsp_NewStatPressMainC’, plugins_url(‘newstatpress/images/stat.png’,nsp_BASENAME));
$nsp_overview_screen=add_submenu_page(‘nsp-main’, __(‘Overview’,’newstatpress’), __(‘Overview’,’newstatpress’), $overview_capability, ‘nsp-main’, ‘nsp_NewStatPressMainC’);
add_submenu_page(‘nsp-main’, __(‘Details’,’newstatpress’), __(‘Details’,’newstatpress’), $details_capability, ‘nsp_details’, ‘nsp_DisplayDetailsC’);
add_submenu_page(‘nsp-main’, __(‘Visits’,’newstatpress’), __(‘Visits’,’newstatpress’), $visits_capability, ‘nsp_visits’, ‘nsp_DisplayVisitsPageC’);
add_submenu_page(‘nsp-main’, __(‘Search’,’newstatpress’), __(‘Search’,’newstatpress’), $search_capability, ‘nsp_search’, ‘nsp_DatabaseSearchC’);
add_submenu_page(‘nsp-main’, __(‘Tools’,’newstatpress’), __(‘Tools’,’newstatpress’), $tools_capability, ‘nsp_tools’, ‘nsp_DisplayToolsPageC’);
add_submenu_page(‘nsp-main’, __(‘Options’,’newstatpress’), __(‘Options’,’newstatpress’), $options_capability, ‘nsp_options’, ‘nsp_OptionsC’);
add_submenu_page(‘nsp-main’, __(‘Credits’,’newstatpress’), __(‘Credits’,’newstatpress’), $credits_capability, ‘nsp_credits’, ‘nsp_DisplayCreditsPageC’);
- The topic ‘access problems for administrator in multisite’ is closed to new replies.