wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



get_registered_theme_feature › WordPress Function

Depuis5.5.0
Dépréciéen/a
get_registered_theme_feature ( $feature )
Paramètres:
  • (string) $feature The feature name. See add_theme_support() for the list of possible values.
    Requis: Oui
Retourne:
  • (array|null) The registration args, or null if the feature was not registered.
Défini(e) dans:
Codex:

Gets the registration config for a theme feature.



Source

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