WP_REST_Themes_Controller::is_same_theme() WordPress Method

The is_same_theme() method is part of the WP_REST_Themes_Controller class and is used to check if two themes are the same.

WP_REST_Themes_Controller::is_same_theme( WP_Theme $theme_a, WP_Theme $theme_b ) #

Helper function to compare two themes.


Parameters

$theme_a

(WP_Theme)(Required)First theme to compare.

$theme_b

(WP_Theme)(Required)Second theme to compare.


Top ↑

Return

(bool)


Top ↑

Source

File: wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php

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


Top ↑

Changelog

Changelog
VersionDescription
5.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.