WP_Customize_Manager::is_cross_domain(): bool

In this article

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

Return

bool Whether cross-domain.

Source

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

VersionDescription
4.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.