Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#37897 closed enhancement (fixed)

Use the status parameter when sending JSON errors from the customizer

Reported by: johnbillion's profile johnbillion Owned by: westonruter's profile westonruter
Milestone: 4.7 Priority: low
Severity: minor Version: 4.7
Component: Customize Keywords: has-patch
Focuses: Cc:


[38422] introduced a $status_code parameter to the wp_send_json_error() function, among others.

The only place in core that currently sets a status code when calling wp_send_json_error() is in the customizer. Let's replace the manual calls to status_header() with this parameter.

Attachments (1)

37897.patch (1.8 KB) - added by johnbillion 8 years ago.

Download all attachments as: .zip

Change History (4)

8 years ago

#1 @johnbillion
8 years ago

  • Keywords has-patch added

#2 @westonruter
8 years ago

  • Owner set to westonruter
  • Resolution set to fixed
  • Status changed from new to closed

In 38478:

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

Props johnbillion.
See #35666.
Fixes #37897.

#3 @westonruter
8 years ago

Love it! 😍

Note: See TracTickets for help on using tickets.