Notice: has_cap() called with a deprecated argument…
-
Hi there,
Since WordPres 2.0, the menu and submenu declarations are waiting for ‘role’ or ‘capacity’ instead of level argument.
You actually use the level 10 for each menu declaration.
Please, replace it by ‘activate_plugins’ as capacity, it works perfectly for Super Admin and Administrator.Lines 53 to 74 will become :
// --- Config MENU add_action('admin_menu','menu_config_NDF'); function menu_config_NDF(){ //menu principal add_menu_page("DoFollow", "DoFollow", 'activate_plugins', "cont_config_NDF", "cont_config_NDF", plugins_url('images/icon.png', __FILE__)); } // --- Config SUB-MENU-EMAIL add_action('admin_menu','sub_menu_config_NDF_email'); function sub_menu_config_NDF_email(){ //sub menu principal $textmenu = __( 'Email White List', 'dofollow-case-by-case'); add_submenu_page("cont_config_NDF", $textmenu , $textmenu, 'activate_plugins', "cont_config_sub_NDF_email", "cont_config_sub_NDF_email"); } // --- Config SUB-MENU-URL add_action('admin_menu','sub_sub_menu_config_NDF_url'); function sub_sub_menu_config_NDF_url(){ //sub menu principal $textmenu = __( 'URL White List', 'dofollow-case-by-case'); add_submenu_page("cont_config_NDF", $textmenu, $textmenu , 'activate_plugins', "cont_config_sub_NDF_url", "cont_config_sub_NDF_url"); }
Thank you in advance.
Nice day.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Notice: has_cap() called with a deprecated argument…’ is closed to new replies.