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



get_allowed_themes ›

Since3.0.0
已弃用3.4.0
get_allowed_themes ( 没有参数 )
查看:
返回:
  • (array) $themes Array of allowed themes.
定义在:
文档:

Get the allowed themes for the current site.



源码

function get_allowed_themes() {
	_deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'allowed' => true ) )" );

	$themes = wp_get_themes( array( 'allowed' => true ) );

	$wp_themes = array();
	foreach ( $themes as $theme ) {
		$wp_themes[ $theme->get('Name') ] = $theme;
	}

	return $wp_themes;
}