wpseek.com
WordPress开发者和主题制作者的搜索引擎



get_registered_theme_feature › WordPress Function

Since5.5.0
已弃用n/a
› get_registered_theme_feature ( $feature )
参数:
  • (string) $feature The feature name. See add_theme_support() for the list of possible values.
    Required: Yes
返回:
  • (array|null) The registration args, or null if the feature was not registered.
定义在:
文档:

Gets the registration config for a theme feature.



源码

function get_registered_theme_feature( $feature ) {
	global $_wp_registered_theme_features;

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

	return $_wp_registered_theme_features[ $feature ] ?? null;
}