remove_menu_page

Definition:
function remove_menu_page( $menu_slug ) {}

Remove a top level admin menu

Parameters

  • 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;

}

10195

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:

WordPress.com Logo

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

Facebook photo

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

Connecting to %s

%d bloggers like this: