wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema
get_themes is deprecated since version 3.4.0!
Alternative: Ver página de detalhe para wp_get_themes »" href="https://pt.wpseek.com/function/wp_get_themes/">wp_get_themes()
Alternative: Ver página de detalhe para wp_get_themes »" href="https://pt.wpseek.com/function/wp_get_themes/">wp_get_themes()
get_themes › WordPress Function
Desde1.5.0
Obsoleto3.4.0
› get_themes ( Sem parâmetros )
Ver: | |
Retorna: |
|
Definido em: |
|
Codex: |
Retrieve list of themes with theme data in theme directory.
The theme is broken, if it doesn't have a parent theme and is missing either style.css and, or index.php. If the theme has a parent theme then it is broken, if it is missing style.css; index.php is optional.Fonte
function get_themes() { _deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_themes()' ); global $wp_themes; if ( isset( $wp_themes ) ) return $wp_themes; $themes = wp_get_themes(); $wp_themes = array(); foreach ( $themes as $theme ) { $name = $theme->get('Name'); if ( isset( $wp_themes[ $name ] ) ) $wp_themes[ $name . '/' . $theme->get_stylesheet() ] = $theme; else $wp_themes[ $name ] = $theme; } return $wp_themes; }