Make WordPress Core


Ignore:
Timestamp:
08/31/2016 07:00:59 PM (8 years ago)
Author:
westonruter
Message:

Customize: Use new $status_code parameter for wp_send_json_error() instead of calling status_header() separately.

Props johnbillion.
See #35666.
Fixes #37897.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-selective-refresh.php

    r38470 r38478  
    316316         */
    317317        if ( ! is_customize_preview() ) {
    318             status_header( 403 );
    319             wp_send_json_error( 'expected_customize_preview' );
     318            wp_send_json_error( 'expected_customize_preview', 403 );
    320319        } else if ( ! isset( $_POST['partials'] ) ) {
    321             status_header( 400 );
    322             wp_send_json_error( 'missing_partials' );
     320            wp_send_json_error( 'missing_partials', 400 );
    323321        }
    324322
Note: See TracChangeset for help on using the changeset viewer.