rest_url_prefix WordPress Filter Hook
The rest_url_prefix hook allows you to change the prefix for the REST API. This can be useful if you want to use a different prefix for your API or if you want to change the prefix for compatibility with a different API.
apply_filters( 'rest_url_prefix', string $prefix ) #
Filters the REST URL prefix.
Parameters
- $prefix
(string)URL prefix. Default 'wp-json'.
Source
File: wp-includes/rest-api.php
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |