wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



get_allowed_themes › WordPress Function

Desde3.0.0
Obsoleto3.4.0
get_allowed_themes ( Sem parâmetros )
Ver:
Retorna:
  • (WP_Theme[]) Array of WP_Theme objects keyed by their name.
Definido em:
Codex:

Get the allowed themes for the current site.



Fonte

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