WP_Customize_Manager::get_return_url()

Get URL to link the user to when closing the Customizer.


Return

(string) URL for link to close Customizer.


Source

File: wp-includes/class-wp-customize-manager.php

	public function get_return_url() {
		$referer = wp_get_referer();
		$excluded_referer_basenames = array( 'customize.php', 'wp-login.php' );

		if ( $this->return_url ) {
			$return_url = $this->return_url;
		} else if ( $referer && ! in_array( basename( parse_url( $referer, PHP_URL_PATH ) ), $excluded_referer_basenames, true ) ) {
			$return_url = $referer;
		} else if ( $this->preview_url ) {
			$return_url = $this->preview_url;
		} else {
			$return_url = home_url( '/' );
		}
		return $return_url;
	}


Changelog

Changelog
Version Description
WP-4.4.0 Introduced.