Warning: This method has been deprecated.
WP_Customize_Manager::wp_redirect_status() WordPress Method
The wp_redirect_status() function is used to set the HTTP status code for a page redirect. This is useful for indicating to the user that a page has moved or been deleted, for example. The status code can be any valid HTTP status code, such as "404 Not Found" or "301 Moved Permanently". The default status code is "302 Found".
WP_Customize_Manager::wp_redirect_status( int $status ) #
Prevents Ajax requests from following redirects when previewing a theme by issuing a 200 response instead of a 30x.
Description
Instead, the JS will sniff out the location header.
Parameters
- $status
(int)(Required)Status.
Return
(int)
Source
File: wp-includes/class-wp-customize-manager.php
public function wp_redirect_status( $status ) { _deprecated_function( __FUNCTION__, '4.7.0' ); if ( $this->is_preview() && ! is_admin() ) { return 200; } return $status; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.7.0 | This method has been deprecated. |
3.4.0 | Introduced. |