This filter is applied within the bcn_rest_controller class in the register_rest_route()
function. This filter was introduced in version 6.2. It receives four parameters:
- $register_rest_endpoint – (boolean)(required) The boolean decision whether or not to allow the REST endpoint to be registered
- $endpoint – (string)(optional) The name of the REST API endpoint being registered
- $version – (string)(optional) The REST API version of the endpoint being registered
- $methods – (array)(optional) The array of methods for the REST API endpoint being registered