• Resolved Geoffrey

    (@creativejuiz)


    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.

    https://www.ads-software.com/plugins/dofollow-case-by-case/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author apasionados

    (@apasionados)

    Hi Geoffrey,

    Thanks for the info. Great work. We updated the lines you pointed out and are running some tests on our beta sites. Once we see that everything runs smoothly we will release the update.

    Thank you.

    Thread Starter Geoffrey

    (@creativejuiz)

    Thank you for your quick reply.
    If you encounter some issue due to that change, tell me, I’m interested too ??

    Thanks and good tests to you.

    Plugin Author apasionados

    (@apasionados)

    Hi Geoffrey,

    After testing it we released the update yesterday. In newer plugins we have been using the capacity manage_options but with actívate_plugins it also works perfectly.

    Thanks again.

    Thread Starter Geoffrey

    (@creativejuiz)

    Great news!
    Thank you for your speed ??
    Nice week!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Notice: has_cap() called with a deprecated argument…’ is closed to new replies.