remove_theme_support

Definition:
function remove_theme_support( $feature ) {}

Allows a theme to de-register its support of a certain feature
Should be called in the theme’s functions.php file. Generally would be used for child themes to override support from the parent theme.

Parameters

  • string $feature: the feature being added

Return values

returns:Whether feature was removed.

Source code

function remove_theme_support( $feature ) {

	// Blacklist: for internal registrations not used directly by themes.

	if ( in_array( $feature, array( 'custom-background', 'custom-header', 'editor-style', 'widgets', 'menus' ) ) )

		return false;

	return _remove_theme_support( $feature );

}

2729

remove_theme_mods

Definition:
function remove_theme_mods() {}

Remove theme modifications option for current theme.

Source code

function remove_theme_mods() {

	delete_option( 'theme_mods_' . get_option( 'stylesheet' ) );

	delete_option( 'mods_' . get_current_theme() );

}

2727

remove_theme_mod

Definition:
function remove_theme_mod( $name ) {}

Remove theme modification name from current theme list.
If removing the name also removes all elements, then the entire option will be removed.

Parameters

  • string $name: Theme modification name.

Source code

function remove_theme_mod( $name ) {

	$mods = get_theme_mods();



	if ( ! isset( $mods[ $name ] ) )

		return;



	unset( $mods[ $name ] );



	if ( empty( $mods ) )

		return remove_theme_mods();



	$theme = get_option( 'stylesheet' );

	update_option( "theme_mods_$theme", $mods );

}

2725

remove_shortcode

Definition:
function remove_shortcode($tag) {}

Removes hook for shortcode.

Parameters

  • string $tag: shortcode tag to remove hook for.

Source code

function remove_shortcode($tag) {

	global $shortcode_tags;



	unset($shortcode_tags[$tag]);

}

2723

remove_role

Definition:
function remove_role( $role ) {}

Remove role, if it exists.

Parameters

  • string $role: Role name.

Source code

function remove_role( $role ) {

	global $wp_roles;



	if ( ! isset( $wp_roles ) )

		$wp_roles = new WP_Roles();



	return $wp_roles->remove_role( $role );

}

2721