WP_Customize_Manager::wp_redirect_status
Deprecated since 4.7.0. It is no longer supported and may 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.
Returns
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() WP Customize Manager::wp redirect status code WP 7.0
public function wp_redirect_status( $status ) {
_deprecated_function( __FUNCTION__, '4.7.0' );
if ( $this->is_preview() && ! is_admin() ) {
return 200;
}
return $status;
}