WP_REST_Themes_Controller::is_same_theme()protectedWP 5.7.0

Helper function to compare two themes.

Method of the class: WP_REST_Themes_Controller{}

No Hooks.

Return

true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->is_same_theme( $theme_a, $theme_b );
$theme_a(WP_Theme) (required)
First theme to compare.
$theme_b(WP_Theme) (required)
Second theme to compare.

Changelog

Since 5.7.0 Introduced.

WP_REST_Themes_Controller::is_same_theme() code WP 6.5.2

protected function is_same_theme( $theme_a, $theme_b ) {
	return $theme_a->get_stylesheet() === $theme_b->get_stylesheet();
}