get_theme()
get_theme( string $theme ) 检索主题数据。Retrieve theme data. …
get_theme( string $theme )
检索主题数据。
Retrieve theme data.
检索主题数据。
Retrieve theme data.
目录锚点:#说明#参数#返回#源码
说明(Description)
另见
获取主题()
参数(Parameters)
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| $theme | (string) | 必需 | 主题名称。 |
返回(Return)
(array|null)如果主题名不存在,则为空。主题数据(array|null)。
源码(Source)
/**
* Retrieve theme data.
*
* @since 1.5.0
* @deprecated 3.4.0
* @deprecated Use wp_get_theme()
* @see wp_get_theme()
*
* @param string $theme Theme name.
* @return array|null Null, if theme name does not exist. Theme data, if exists.
*/
function get_theme( $theme ) {
_deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme( $stylesheet )' );
$themes = get_themes();
if ( is_array( $themes ) && array_key_exists( $theme, $themes ) )
return $themes[ $theme ];
return null;
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 3.4.0 | wp-includes/deprecated.php:2919 | 0 | 2 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。




还没有任何评论,赶紧来占个楼吧!