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



get_theme ›

Since1.5.0
已弃用3.4.0
get_theme ( $theme )
参数:
  • (string) $theme Theme name.
    Required: Yes
查看:
返回:
  • (array|null) Null, if theme name does not exist. Theme data, if exists.
定义在:
文档:

Retrieve theme data.



源码

function get_theme( $theme ) {
	_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme( $stylesheet )' );

	$themes = get_themes();
	if ( is_array( $themes ) && array_key_exists( $theme, $themes ) )
		return $themes[ $theme ];
	return null;
}