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



wp_get_active_and_valid_themes ›

Desde5.1.0
Obsoleton/a
wp_get_active_and_valid_themes ( Sem parâmetros )
Acesso:
  • private
Retorna:
  • (array) Array of paths to theme directories.
Definido em:
Codex:

Retrieves an array of active and valid themes.

While upgrading or installing WordPress, no themes are returned.



Fonte

function wp_get_active_and_valid_themes() {
	global $pagenow;

	$themes = array();

	if ( wp_installing() && 'wp-activate.php' !== $pagenow ) {
		return $themes;
	}

	if ( TEMPLATEPATH !== STYLESHEETPATH ) {
		$themes[] = STYLESHEETPATH;
	}

	$themes[] = TEMPLATEPATH;

	return $themes;
}