Uses
| Uses | Description |
|---|---|
| wp-includes/theme.php: wp_get_theme() | Gets a WP_Theme object for a theme. |
Determines the latest WordPress default theme that is installed.
This hits the filesystem.
(WP_Theme|false) Object, or false if no theme is installed, which would be bad.
File: wp-includes/class-wp-theme.php
public static function get_core_default_theme() {
foreach ( array_reverse( self::$default_themes ) as $slug => $name ) {
$theme = wp_get_theme( $slug );
if ( $theme->exists() ) {
return $theme;
}
}
return false;
} | Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_theme/get_core_default_theme