[wp-trac] [WordPress Trac] #36271: Trigger _doing_it_wrong if wp_send_json is used on a REST API request

WordPress Trac noreply at wordpress.org
Tue Jul 7 05:00:06 UTC 2020


#36271: Trigger _doing_it_wrong if wp_send_json is used on a REST API request
-------------------------+---------------------------
 Reporter:  rmccue       |       Owner:  spacedmonkey
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  5.5
Component:  REST API     |     Version:  4.4
 Severity:  normal       |  Resolution:  fixed
 Keywords:  has-patch    |     Focuses:
-------------------------+---------------------------
Changes (by whyisjake):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"48361" 48361]:
 {{{
 #!CommitTicketReference repository="" revision="48361"
 REST API: Trigger `_doing_it_wrong()` if `wp_send_json()` is used on a
 REST API request

 In addition to triggering the `_doing_it_wrong()` logging, also adds a `X
 -WP-DoingItWrong` header.

 Fixes #36271.

 Props rmccue, TimothyBlynJacobs.
 }}}

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


More information about the wp-trac mailing list