get_themes [ WordPress Function ]
| See: | |
| Returns: |
|
| 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
- Function Reference/get themes « WordPress Codex
Description. 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 or ...
codex.wordpress.org - #20103 (Rewrite get_themes() and other enemies of sanity ...
get_themes() is a memory hog (#11214). The data it returns, and how it calculates it, is terribly designed (#15858, #12275, others) and inflexible (#19816 , ...
core.trac.wordpress.org - Themes Gallery - Chrome Web Store
Discover great apps, games, extensions and themes for Google Chrome.
chrome.google.com - get_themes | A HitchHackers guide through WordPress
Feb 12, 2011 ... 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 ...
hitchhackerguide.com