WP_Theme::get_core_default_theme(): WP_Theme|false

Determines the latest WordPress default theme that is installed.


Description

This hits the filesystem.


Top ↑

Return

WP_Theme|false Object, or false if no theme is installed, which would be bad.


Top ↑

Source

File: wp-includes/class-wp-theme.php. View all references

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;
}


Top ↑

Changelog

Changelog
Version Description
4.4.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.