Using the REST API (v2) javascript client on a private namespaced route
To modify the rest url prefix you can filter rest_url_prefix. But that just changes the /wp-json/ prefix that every namespace uses. Trying to modify wp/v2 means modifying the plugin and that namespace is hard-coded in several places like; WP_REST_Post_Statuses_Controller. To add your own custom endpoints, register_rest_route is in core to do just that. <?php add_action( … Read more