On this page
WP_REST_Themes_Controller::is_same_theme( WP_Theme $theme_a, WP_Theme $theme_b ): bool
Helper function to compare two themes.
Parameters
Return
bool
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php. View all references
protected function is_same_theme( $theme_a, $theme_b ) {
return $theme_a->get_stylesheet() === $theme_b->get_stylesheet();
}
Related
Used By
| Used By | Description |
|---|---|
| WP_REST_Themes_Controller::get_item_permissions_check() wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php | Checks if a given request has access to read the theme. |
| WP_REST_Themes_Controller::prepare_links() wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php | Prepares links for the request. |
| WP_REST_Themes_Controller::get_items() wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php | Retrieves a collection of themes. |
| WP_REST_Themes_Controller::prepare_item_for_response() wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php | Prepares a single theme output for response. |
Changelog
| Version | Description |
|---|---|
| 5.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_themes_controller/is_same_theme