WP_REST_Themes_Controller::is_same_theme()
Helper function to compare two themes.
Метод класса: WP_REST_Themes_Controller{}
Хуков нет.
Возвращает
true|false
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->is_same_theme( $theme_a, $theme_b );
- $theme_a(WP_Theme) (обязательный)
- First theme to compare.
- $theme_b(WP_Theme) (обязательный)
- Second theme to compare.
Список изменений
С версии 5.7.0 | Введена. |
Код WP_REST_Themes_Controller::is_same_theme() WP REST Themes Controller::is same theme WP 6.2.2
protected function is_same_theme( $theme_a, $theme_b ) { return $theme_a->get_stylesheet() === $theme_b->get_stylesheet(); }