remove_submenu_page

Definition:
function remove_submenu_page( $menu_slug, $submenu_slug ) {}

Remove an admin submenu

Parameters

  • string $menu_slug: The slug for the parent menu
  • string $submenu_slug: The slug of the submenu

Return values

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

Source code

function remove_submenu_page( $menu_slug, $submenu_slug ) {

	global $submenu;



	if ( !isset( $submenu[$menu_slug] ) )

		return false;



	foreach ( $submenu[$menu_slug] as $i => $item ) {

		if ( $submenu_slug == $item[2] ) {

			unset( $submenu[$menu_slug][$i] );

			return $item;

		}

	}



	return false;

}

10204

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

remove_editor_styles

Definition:
function remove_editor_styles() {}

Removes all visual editor stylesheets.

Return values

returns:True on success, false if there were no stylesheets to remove.

Source code

function remove_editor_styles() {

	if ( ! current_theme_supports( 'editor-style' ) )

		return false;

	_remove_theme_support( 'editor-style' );

	if ( is_admin() )

		$GLOBALS['editor_styles'] = array();

	return true;

}

10192

remove_custom_image_header

Definition:
function remove_custom_image_header() {}

Remove image header support.

Return values

returns:Whether support was removed.

Source code

function remove_custom_image_header() {

	if ( ! current_theme_supports( 'custom-header' ) )

		return false;



	$callback = get_theme_support( 'custom-header' );

	remove_action( 'wp_head', $callback[0]['callback'] );

	_remove_theme_support( 'custom-header' );

	remove_theme_support( 'custom-header-uploads' );



	if ( is_admin() ) {

		remove_action( 'admin_menu', array( &$GLOBALS['custom_image_header'], 'init' ) );

		unset( $GLOBALS['custom_image_header'] );

	}



	return true;

}

10190

remove_custom_background

Definition:
function remove_custom_background() {}

Remove custom background support.

Return values

returns:Whether support was removed.

Source code

function remove_custom_background() {

	if ( ! current_theme_supports( 'custom-background' ) )

		return false;



	$callback = get_theme_support( 'custom-background' );

	remove_action( 'wp_head', $callback[0]['callback'] );

	_remove_theme_support( 'custom-background' );



	if ( is_admin() ) {

		remove_action( 'admin_menu', array( &$GLOBALS['custom_background'], 'init' ) );

		unset( $GLOBALS['custom_background'] );

	}



	return true;

}

10188