get_themes()

最后更新于:2021-11-27 00:58:16

get_themes()

Retrieve list of themes with theme data in theme directory.

响应

(array) Theme list with theme data.

源文件

文件: gc-includes/deprecated.php

function get_themes() {
	_deprecated_function( __FUNCTION__, '3.4.0', 'gc_get_themes()' );

	global $gc_themes;
	if ( isset( $gc_themes ) )
		return $gc_themes;

	$themes = gc_get_themes();
	$gc_themes = array();

	foreach ( $themes as $theme ) {
		$name = $theme->get('Name');
		if ( isset( $gc_themes[ $name ] ) )
			$gc_themes[ $name . '/' . $theme->get_stylesheet() ] = $theme;
		else
			$gc_themes[ $name ] = $theme;
	}

	return $gc_themes;
}