Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#37897 closed enhancement (fixed)

Use the status parameter when sending JSON errors from the customizer

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

Description

[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 10 years ago.

Download all attachments as: .zip

Change History (4)

@johnbillion
10 years ago

#1 @johnbillion
10 years ago

  • Keywords has-patch added

#2 @westonruter
10 years ago

  • Owner set to westonruter
  • Resolution → fixed
  • Status new → 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
10 years ago

Love it! 😍

Note: See TracTickets for help on using tickets.