remove_menu_page( string $menu_slug )
Remove a top-level admin menu.
Parameters
- $menu_slug
-
(Required) The slug of the menu.
Return
(array|bool) The removed menu on success, false if not found.
Source
File: wp-admin/includes/plugin.php
function remove_menu_page( $menu_slug ) {
global $menu;
foreach ( $menu as $i => $item ) {
if ( $menu_slug == $item[2] ) {
unset( $menu[$i] );
return $item;
}
}
return false;
}
Changelog
Version | Description |
---|---|
WP-3.1.0 | Introduced. |