diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
index 42977cb..5323c32 100644
|
|
|
final class WP_Customize_Manager { |
| 394 | 394 | $this->prepare_controls(); |
| 395 | 395 | |
| 396 | 396 | wp_enqueue_script( 'customize-preview' ); |
| | 397 | add_action( 'wp', array( $this, 'customize_preview_override_404_status' ) ); |
| 397 | 398 | add_action( 'wp_head', array( $this, 'customize_preview_base' ) ); |
| 398 | 399 | add_action( 'wp_head', array( $this, 'customize_preview_html5' ) ); |
| 399 | 400 | add_action( 'wp_footer', array( $this, 'customize_preview_settings' ), 20 ); |
| … |
… |
final class WP_Customize_Manager { |
| 416 | 417 | } |
| 417 | 418 | |
| 418 | 419 | /** |
| | 420 | * Prevent sending a 404 status when returning the response for the customize |
| | 421 | * preview, since it causes the jQuery Ajax to fail. Send 200 instead. |
| | 422 | * |
| | 423 | * @since 4.0.0 |
| | 424 | */ |
| | 425 | public function customize_preview_override_404_status() { |
| | 426 | if ( is_404() ) { |
| | 427 | status_header( 200 ); |
| | 428 | } |
| | 429 | } |
| | 430 | |
| | 431 | /** |
| 419 | 432 | * Print base element for preview frame. |
| 420 | 433 | * |
| 421 | 434 | * @since 3.4.0 |