WP_Customize_Manager::is_cross_domain()
Determines whether the admin and the frontend are on different domains.
Return
(bool) Whether cross-domain.
Source
File: wp-includes/class-wp-customize-manager.php
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; }
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_manager/is_cross_domain