Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_themes [ WordPress Function ]

get_themes ( No parameters )
See:
Returns:
  • (array) Theme list with theme data.
Defined at:



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.

Source


<?php
function get_themes() {
    
_deprecated_function__FUNCTION__'3.4''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;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics