WP_Customize_Manager::is_cross_domain()
Determines whether the admin and the frontend are on different domains.
Метод класса: WP_Customize_Manager{}
Хуков нет.
Возвращает
true|false
. Whether cross-domain.
Использование
$WP_Customize_Manager = new WP_Customize_Manager(); $WP_Customize_Manager->is_cross_domain();
Список изменений
С версии 4.7.0 | Введена. |
Код WP_Customize_Manager::is_cross_domain() WP Customize Manager::is cross domain WP 6.6.1
public function is_cross_domain() { $admin_origin = wp_parse_url( admin_url() ); $home_origin = wp_parse_url( home_url() ); $cross_domain = ( strtolower( $admin_origin['host'] ) !== strtolower( $home_origin['host'] ) ); return $cross_domain; }