get_registered_theme_feature()

最后更新于:2021-11-26 23:35:05

get_registered_theme_feature( string$feature)

Gets the registration config for a theme feature.

参数

$feature

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

响应

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

源文件

文件: gc-includes/theme.php

function get_registered_theme_feature( $feature ) {
	global $_gc_registered_theme_features;

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

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