GC_Customize_Manager::gc_redirect_status()

最后更新于:2021-11-27 02:50:14

GC_Customize_Manager::gc_redirect_status( int$status)

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

参数

$status

(int) (Required) Status.

响应

(int)

源文件

文件: gc-includes/class-gc-customize-manager.php

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

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

		return $status;
	}