dmchale / disable-json-api

Public repo for the "Disable REST API" WordPress plugin, currently with 90,000+ active installs in the wordpress.org repository
10 stars 9 forks source link

Combining whitelist_routes and only_allow_logged_in_rest_access #10

Closed tangrufus closed 7 years ago

tangrufus commented 7 years ago

SimplifyingDisable_REST_API by combine whitelist_routes and only_allow_logged_in_rest_access.

Hooking rest_authentication_errors twice makes it more complicated than necessary.

dmchale commented 7 years ago

Done. Hooking at priority 20, to give some flexibility before and after (but mostly make sure we hook AFTER most other things will at default priority) : https://github.com/dmchale/disable-json-api/commit/6147458ace09fe9143500ebd653ad8b376bd65a6