wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



get_allowed_themes › WordPress Function

Depuis3.0.0
Dépréciée3.4.0
get_allowed_themes ( Pas de paramètres )
Voir:
Retourne:
  • (WP_Theme[]) Array of WP_Theme objects keyed by their name.
Défini(e) dans:
Codex:

Get the allowed themes for the current site.



Source

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;
}