Ticket #37897: 37897.patch
File 37897.patch, 1.8 KB (added by , 8 years ago) |
---|
-
src/wp-includes/customize/class-wp-customize-selective-refresh.php
314 314 * WP_Customize_Manager::setup_theme() is where the previewing flag is set. 315 315 */ 316 316 if ( ! is_customize_preview() ) { 317 status_header( 403 ); 318 wp_send_json_error( 'expected_customize_preview' ); 317 wp_send_json_error( 'expected_customize_preview', 403 ); 319 318 } else if ( ! isset( $_POST['partials'] ) ) { 320 status_header( 400 ); 321 wp_send_json_error( 'missing_partials' ); 319 wp_send_json_error( 'missing_partials', 400 ); 322 320 } 323 321 324 322 $partials = json_decode( wp_unslash( $_POST['partials'] ), true ); -
src/wp-includes/class-wp-customize-nav-menus.php
749 749 */ 750 750 public function ajax_insert_auto_draft_post() { 751 751 if ( ! check_ajax_referer( 'customize-menus', 'customize-menus-nonce', false ) ) { 752 status_header( 400 ); 753 wp_send_json_error( 'bad_nonce' ); 752 wp_send_json_error( 'bad_nonce', 400 ); 754 753 } 755 754 756 755 if ( ! current_user_can( 'customize' ) ) { 757 status_header( 403 ); 758 wp_send_json_error( 'customize_not_allowed' ); 756 wp_send_json_error( 'customize_not_allowed', 403 ); 759 757 } 760 758 761 759 if ( empty( $_POST['params'] ) || ! is_array( $_POST['params'] ) ) { 762 status_header( 400 ); 763 wp_send_json_error( 'missing_params' ); 760 wp_send_json_error( 'missing_params', 400 ); 764 761 } 765 762 766 763 $params = wp_array_slice_assoc(