get_registered_theme_feature()WP 5.5.0

Gets the registration config for a theme feature.

No Hooks.

Return

Array|null. The registration args, or null if the feature was not registered.

Usage

get_registered_theme_feature( $feature );
$feature(string) (required)
The feature name. See add_theme_support() for the list of possible values.

Notes

  • Global. Array. $_wp_registered_theme_features

Changelog

Since 5.5.0 Introduced.

get_registered_theme_feature() code WP 6.5.4

function get_registered_theme_feature( $feature ) {
	global $_wp_registered_theme_features;

	if ( ! is_array( $_wp_registered_theme_features ) ) {
		return null;
	}

	return isset( $_wp_registered_theme_features[ $feature ] ) ? $_wp_registered_theme_features[ $feature ] : null;
}