get_registered_theme_feature( string $feature )

Gets the registration config for a theme feature.


Parameters

$feature

(string) (Required) The feature name. See add_theme_support() for the list of possible values.


Top ↑

Return

(array|null) The registration args, or null if the feature was not registered.


Top ↑

Source

File: wp-includes/theme.php

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

Top ↑

Changelog

Changelog
Version Description
5.5.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.