Plugin View Details Link

The ‘View details’ link in the installed plugins list table is only shown for plugins that are hosted in the WordPress.org plugin repository. If you take a look at the source for WP_Plugins_List_Table->single_row(), you’ll see that the details link is only generated if there’s API data present, e.g. the slug is set: // Details link … Read more

How to Add a Third Level Sub Menu to the WordPress Admin Menu

No, it is not possible to create third level menu in admin panel. If you look at the definition of add_submenu_page, you need to mention the parent slug name. For eg: add_menu_page ( ‘Test Menu’, ‘Test Menu’, ‘read’, ‘testmainmenu’, ”, ” ); add_submenu_page ( ‘testmainmenu’, ‘Test Menu’, ‘Child1’, ‘read’, ‘child1’, ”); The first parameter of … Read more

Remove duplicate main – submenu in admin?

Hi @JM at Work: Yes, it is unfortunately that the submenu page is added for every menu page. It would be nice if there were an option but alas, there currently is not. To remove the submenu page option in WordPress 3.1 or great use remove_submenu_page() with code like this in your theme’s functions.php file, … Read more

The Great WordPress Admin Menu Challenge of Jan 2011 (a.k.a. How to Resolve Some Challenges when Modifying the WordPress Admin Menu System?)

Mike, I’ve taken a look at the code and your ideal end use case … and some of them, frankly, aren’t possible with the current system. Again, your requirements: Get the “Microsite” submenu page to be highlighted when editing an Attorney Get the Attorney Menu Page link to link to /wp-admin/edit.php?post_type=attorney when editing an Attorney … Read more

How to remove entire admin menu?

The correct hook to use is admin_menu and then create a function to remove the menus you want to remove. The following 2 functions remove all the menus. add_action( ‘admin_menu’, ‘remove_admin_menus’ ); add_action( ‘admin_menu’, ‘remove_admin_submenus’ ); //Remove top level admin menus function remove_admin_menus() { remove_menu_page( ‘edit-comments.php’ ); remove_menu_page( ‘link-manager.php’ ); remove_menu_page( ‘tools.php’ ); remove_menu_page( ‘plugins.php’ … Read more

Adding a custom admin page

You need just two steps: Hook into the action admin_menu, register the page with a callback function to print the content. In your callback function load the file from plugin_dir_path( __FILE__ ) . “included.html”. Demo code: add_action( ‘admin_menu’, ‘wpse_91693_register’ ); function wpse_91693_register() { add_menu_page( ‘Include Text’, // page title ‘Include Text’, // menu title ‘manage_options’, … Read more