The `rest_api_init` hook is an action hook and should be used as such. Replace `add_filter()` with `add_action()` to register our init method.
The `rest_api_init` hook is an action hook and should be used as such. Replace `add_filter()` with `add_action()` to register our init method.