Changeset 20861 for trunk/wp-includes/class-wp-customize-manager.php
- Timestamp:
- 05/24/2012 01:48:32 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-customize-manager.php
r20860 r20861 35 35 add_action( 'wp_loaded', array( $this, 'wp_loaded' ) ); 36 36 37 // Run wp_redirect_status late to make sure we override the status last. 38 add_action( 'wp_redirect_status', array( $this, 'wp_redirect_status' ), 1000 ); 39 37 40 add_action( 'wp_ajax_customize_save', array( $this, 'save' ) ); 38 41 … … 209 212 if ( $this->is_preview() && ! is_admin() ) 210 213 $this->customize_preview_init(); 214 } 215 216 /** 217 * Prevents AJAX requests from following redirects when previewing a theme 218 * by issuing a 200 response instead of a 30x. 219 * 220 * Instead, the JS will sniff out the location header. 221 * 222 * @since 3.4.0 223 */ 224 public function wp_redirect_status( $status ) { 225 if ( $this->is_preview() && ! is_admin() ) 226 return 200; 227 228 return $status; 211 229 } 212 230
Note: See TracChangeset
for help on using the changeset viewer.