WP_Theme::get_core_default_theme()
Determines the latest WordPress default theme that is installed.
This hits the filesystem.
Method of the class: WP_Theme{}
No Hooks.
Return
WP_Theme|false
. Object, or false if no theme is installed, which would be bad.
Usage
$result = WP_Theme::get_core_default_theme();
Changelog
Since 4.4.0 | Introduced. |
WP_Theme::get_core_default_theme() WP Theme::get core default theme code WP 6.7.1
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; }