[wp-trac] [WordPress Trac] #35666: Add support for HTTP response codes to wp_send_json_error(), wp_send_json_success(), and wp_send_json

WordPress Trac noreply at wordpress.org
Thu Sep 8 13:44:34 UTC 2016


#35666: Add support for HTTP response codes to wp_send_json_error(),
wp_send_json_success(), and wp_send_json
-------------------------------------+--------------------------
 Reporter:  johnbillion              |       Owner:  johnbillion
     Type:  enhancement              |      Status:  reopened
 Priority:  normal                   |   Milestone:  4.7
Component:  Formatting               |     Version:  3.5
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+--------------------------

Comment (by johnbillion):

 In [changeset:"38576"]:
 {{{
 #!CommitTicketReference repository="" revision="38576"
 Formatting: Don't send an HTTP status code in `wp_send_json()` by default.
 This avoids clobbering an HTTP status code that may have been set prior to
 calling this function.

 Props westonruter
 See #35666
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35666#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list