get_themes()
get_themes() 检索主题目录中包含主题数据的主题列表。Retrieve list of themes…
get_themes()
检索主题目录中包含主题数据的主题列表。
Retrieve list of themes with theme data in theme directory.
目录锚点:#说明#返回#源码
说明(Description)
另见函数 wp_get_themes()
返回(Return)
(array)包含主题数据的主题列表。
源码(Source)
/** * Retrieve list of themes with theme data in theme directory. * * The theme is broken, if it doesn't have a parent theme and is missing either * style.css and, or index.php. If the theme has a parent theme then it is * broken, if it is missing style.css; index.php is optional. * * @since 1.5.0 * @deprecated 3.4.0 * @deprecated Use wp_get_themes() * @see wp_get_themes() * * @return array Theme list with theme data. */ function get_themes() { _deprecated_function( __FUNCTION__, '3.4', 'wp_get_themes()' ); global $wp_themes; if ( isset( $wp_themes ) ) return $wp_themes; $themes = wp_get_themes(); $wp_themes = array(); foreach ( $themes as $theme ) { $name = $theme->get('Name'); if ( isset( $wp_themes[ $name ] ) ) $wp_themes[ $name . '/' . $theme->get_stylesheet() ] = $theme; else $wp_themes[ $name ] = $theme; } return $wp_themes; }
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
3.4.0 | wp-includes/deprecated.php:2888 | 1 function | 2 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。
还没有任何评论,赶紧来占个楼吧!