Move plugin-settings to ‘Settings’-menu in the admin

You seem to be making life complicated. Here’s the code you need; function menu_shuffle() { remove_menu_page( ‘plugin-page’ ); add_submenu_page(‘options-general.php’,’Page Title’, ‘Menu Label’,’manage_options’, ‘plugin-page’ ); }; add_action( ‘admin_menu’, ‘menu_shuffle’ ); plugin-page can be found by mousing over the existing menu label and getting the part after the ?page=in this case ?page=plugin-page The WordPress function definition for … Read more

Change order of custom submenu link in WP Admin?

Take a look at this function. function my_submenu_order($menu_ord) { global $submenu; // echo ‘<pre>’.print_r($submenu,true).'</pre>’; $arr = array(); $arr[] = $submenu[‘users.php’][15]; // Your Profile $arr[] = $submenu[‘users.php’][10]; // Add New $arr[] = $submenu[‘users.php’][5]; // All Users $submenu[‘users.php’] = $arr; return $menu_ord; } add_filter(‘custom_menu_order’, ‘my_submenu_order’); Add that to your functions.php. It changes the default order of the … Read more

Hide admin menu on update_option

OK, so you put your form in manu page callback and the code that is processing that form is also in that same function. And you register your manu pages on admin_menu hook. All of that means that when you process your form and change the value of your option, the menu is already registered. … Read more

Develop Admin Panel Page

WP_List_Table class is used to generate the List Tables that populate WordPress’ various admin screens. It has an advantage over previous implementations in that it can be dynamically altered with AJAX and may be hooked in future WordPress releases. If you want to use this class pay attention to this warning by WordPress. This class’s … Read more

Silently register plugin pages

The mighty Codex holds the answers: If you’re running into the »You do not have sufficient permissions to access this page.« message in a wp_die() screen, then you’ve hooked too early. The hook you should use is admin_menu. $parent_slug: Use NULL or set to options.php if you want to create a page that doesn’t appear … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)