WP_Customize_Manager::wp_redirect_status()publicWP 3.4.0

Deprecated from version 4.7.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Prevents Ajax requests from following redirects when previewing a theme by issuing a 200 response instead of a 30x.

Instead, the JS will sniff out the location header.

Method of the class: WP_Customize_Manager{}

No Hooks.

Return

Int.

Usage

$WP_Customize_Manager = new WP_Customize_Manager();
$WP_Customize_Manager->wp_redirect_status( $status );
$status(int) (required)
Status.

Changelog

Since 3.4.0 Introduced.
Deprecated since 4.7.0

WP_Customize_Manager::wp_redirect_status() code WP 6.4.3

public function wp_redirect_status( $status ) {
	_deprecated_function( __FUNCTION__, '4.7.0' );

	if ( $this->is_preview() && ! is_admin() ) {
		return 200;
	}

	return $status;
}