[wp-trac] [WordPress Trac] #42061: Add new utility function for checking if the current request is a REST API request.

WordPress Trac noreply at wordpress.org
Mon Aug 27 20:39:18 UTC 2018


#42061: Add new utility function for checking if the current request is a REST API
request.
----------------------------+-----------------------
 Reporter:  lots.0.logs     |       Owner:  (none)
     Type:  enhancement     |      Status:  reopened
 Priority:  normal          |   Milestone:  5.0
Component:  Bootstrap/Load  |     Version:  4.9
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  rest-api
----------------------------+-----------------------

Comment (by lots.0.logs):

 I see you changed the name to `wp_is_rest_request()`. That is inconsistent
 with existing similar utility functions. IMO, `wp_doing_rest()` is the
 most appropriate name for this function.

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


More information about the wp-trac mailing list