function remove_menu_page( $menu_slug ) {}

Remove a top level admin menu


  • string $menu_slug: The slug of the menu

Return values

returns:The removed menu on success, False if not found

Source code

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;



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: