Changeset 28970
- Timestamp:
- 07/03/2014 04:10:01 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r28861 r28970 407 407 408 408 wp_enqueue_script( 'customize-preview' ); 409 add_action( 'wp', array( $this, 'customize_preview_override_404_status' ) ); 409 410 add_action( 'wp_head', array( $this, 'customize_preview_base' ) ); 410 411 add_action( 'wp_head', array( $this, 'customize_preview_html5' ) ); … … 426 427 */ 427 428 do_action( 'customize_preview_init', $this ); 429 } 430 431 /** 432 * Prevent sending a 404 status when returning the response for the customize 433 * preview, since it causes the jQuery Ajax to fail. Send 200 instead. 434 * 435 * @since 4.0.0 436 */ 437 public function customize_preview_override_404_status() { 438 if ( is_404() ) { 439 status_header( 200 ); 440 } 428 441 } 429 442
Note: See TracChangeset
for help on using the changeset viewer.