A WordPress-centric search engine for devs and theme authors



get_allowed_themes ›

Since3.0.0
Deprecated3.4.0
get_allowed_themes ( No parameters )
See:
Returns:
  • (array) $themes Array of allowed themes.
Defined at:
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;
}