WordPress at Your Fingertips
function is not described

WP_Customize_Manager::is_cross_domain() public WP 4.7.0

Determines whether the admin and the frontend are on different domains.

{} It's a method of the class: WP_Customize_Manager{}

No Hooks.

Return

true|false. Whether cross-domain.

Usage

$WP_Customize_Manager = new WP_Customize_Manager();
$WP_Customize_Manager->is_cross_domain();

Changelog

Since 4.7.0 Introduced.

Code of WP_Customize_Manager::is_cross_domain() WP 5.8.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;
}