dimanche 30 novembre 2014

How to remove_menu_page added by a plugin that appears to have no referenceable slug


How do I remove a menu page that is added by a plugin like this:



add_action('admin_menu', array($this, 'add_menu'));


Where there is no slug. Looking at the plugin code and using the links in the anchors doesn't seem to work:



remove_menu_page( 'admin.php?page=tf_slider_list' );


Any suggestions how to remove these links from the menu? I'm going to be removing it for non-admins, so using it in conjunction with:



function custom_remove_menu_pages() {
remove_submenu_page( 'page.php', 'admin.php?page=tf_slider_list' );
}
add_action( 'admin_menu', 'custom_remove_menu_pages', 999 );




Aucun commentaire:

Enregistrer un commentaire