WordPress at a glance
function is not described

WP_Customize_Manager::set_preview_url() public WP 4.4.0

Set the initial URL to be previewed.

URL is validated.

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

No Hooks.

Return

null. Nothing.

Usage

$WP_Customize_Manager = new WP_Customize_Manager();
$WP_Customize_Manager->set_preview_url( $preview_url );
$preview_url(string) (required)
URL to be previewed.

Changelog

Since 4.4.0 Introduced.

Code of WP_Customize_Manager::set_preview_url() WP 5.7.2

<?php
public function set_preview_url( $preview_url ) {
	$preview_url       = esc_url_raw( $preview_url );
	$this->preview_url = wp_validate_redirect( $preview_url, home_url( '/' ) );
}