[wp-trac] [WordPress Trac] #39806: Disable REST API by default, making it opt-in rather than always-on

WordPress Trac noreply at wordpress.org
Tue Feb 7 20:24:13 UTC 2017


#39806: Disable REST API by default, making it opt-in rather than always-on
-------------------------+------------------------------
 Reporter:  mor10        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  REST API     |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:  close        |     Focuses:
-------------------------+------------------------------

Comment (by GunGeekATX):

 Replying to [comment:9 jnylen0]:
 > Replying to [comment:8 GunGeekATX]:
 > > Thanks, I'll take a look at that.
 >
 > I take that back - it does work, and here's why:
 >
 > - https://github.com/WordPress/wordpress-develop/blob/4.7.2/src/wp-
 includes/default-filters.php#L235
 > - https://github.com/WordPress/wordpress-develop/blob/4.7.2/src/wp-
 includes/rest-api.php#L687-L715
 >
 > Still, I wouldn't recommend this approach.

 Disabling the REST API, or the code around `$error`?  I do agree that I
 should have better checking for WP_Error, nulls, etc.

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


More information about the wp-trac mailing list