Skip to main content
added 138 characters in body
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251

The preferred method of creating a settings page is to use the WordPress Settings API.

From your code example, it looks like it's too late to remove the admin_notices hook inside your callback in the admin_menu hook.

You should try to move the logic from the customfunc() callback into another callback activated from some earlier hook, for example admin_init.

Additionally:

You are also calling the new admin menu page settings, but the user might confuse it with the existing Settings page.

ps: The User Levels you have in one of the add_menu_page() input parameters, are deprecated, use instead some of the Capabilites mentioned here.

So instead use for example:

add_menu_page( 'My settings', 'My settings', 'manage_options', 'custom', 'customfunc' );

The preferred method of creating a settings page is to use the WordPress Settings API.

From your code example, it looks like it's too late to remove the admin_notices hook inside your callback in the admin_menu hook.

You should try to move the logic from the customfunc() callback into another callback activated from some earlier hook, for example admin_init.

You are also calling the new admin menu page settings, but the user might confuse it with the existing Settings page.

ps: The User Levels you have in one of the add_menu_page() input parameters, are deprecated, use instead some of the Capabilites mentioned here.

The preferred method of creating a settings page is to use the WordPress Settings API.

From your code example, it looks like it's too late to remove the admin_notices hook inside your callback in the admin_menu hook.

You should try to move the logic from the customfunc() callback into another callback activated from some earlier hook, for example admin_init.

Additionally:

You are also calling the new admin menu page settings, but the user might confuse it with the existing Settings page.

The User Levels you have in one of the add_menu_page() input parameters, are deprecated, use instead some of the Capabilites mentioned here.

So instead use for example:

add_menu_page( 'My settings', 'My settings', 'manage_options', 'custom', 'customfunc' );
deleted 4 characters in body
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251

The preferred method of creating a settings page is to use the WordPress Settings API.

But fromFrom your code example, it looks like it's too late to remove the admin_notices hook inside your callback in the admin_menu hook.

You should try to move the logic from the customfunc() callback into another callback activated from some earlier hook, for example admin_init.

You are also calling the new admin menu page settings, but the user might confuse it with the existing Settings page.

ps: The User Levels you have in one of the add_menu_page() input parameters, are deprecated, use instead some of the Capabilites mentioned here.

The preferred method of creating a settings page is to use the WordPress Settings API.

But from your code example, it looks like it's too late to remove the admin_notices hook inside your callback in the admin_menu hook.

You should try to move the logic from the customfunc() callback into another callback activated from some earlier hook, for example admin_init.

You are also calling the new menu page settings, but the user might confuse it with the existing Settings page.

ps: The User Levels you have in one of the add_menu_page() input parameters, are deprecated, use instead some of the Capabilites mentioned here.

The preferred method of creating a settings page is to use the WordPress Settings API.

From your code example, it looks like it's too late to remove the admin_notices hook inside your callback in the admin_menu hook.

You should try to move the logic from the customfunc() callback into another callback activated from some earlier hook, for example admin_init.

You are also calling the new admin menu page settings, but the user might confuse it with the existing Settings page.

ps: The User Levels you have in one of the add_menu_page() input parameters, are deprecated, use instead some of the Capabilites mentioned here.

added 139 characters in body
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251

The preferred method of creating a settings page is to use the WordPress Settings API.

But from your code example, it looks like it's too late to remove the admin_notices hook inside your callback in the admin_menu hook.

You should try to move the logic from the customfunc() callback into another callback activated from some earlier hook, for example admin_init.

You are also calling the new menu page settings, but the user might confuse it with the existing Settings page.

ps: You should check outThe User Levels you have in one of the settings APIadd_menu_page() input parameters, are deprecated, use instead some of the Capabilites mentioned here.

The preferred method of creating a settings page is to use the WordPress Settings API.

But from your code example, it looks like it's too late to remove the admin_notices hook inside your callback in the admin_menu hook.

You should try to move the logic from the customfunc() callback into another callback activated from some earlier hook, for example admin_init.

You are also calling the new menu page settings, but the user might confuse it with the existing Settings page.

ps: You should check out the settings API.

The preferred method of creating a settings page is to use the WordPress Settings API.

But from your code example, it looks like it's too late to remove the admin_notices hook inside your callback in the admin_menu hook.

You should try to move the logic from the customfunc() callback into another callback activated from some earlier hook, for example admin_init.

You are also calling the new menu page settings, but the user might confuse it with the existing Settings page.

ps: The User Levels you have in one of the add_menu_page() input parameters, are deprecated, use instead some of the Capabilites mentioned here.

added 17 characters in body
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251
Loading
added 17 characters in body
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251
Loading
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251
Loading