rest_url_prefix
Filters the REST URL prefix.
Usage
add_filter( 'rest_url_prefix', 'wp_kama_rest_url_prefix_filter' ); /** * Function for `rest_url_prefix` filter-hook. * * @param string $prefix URL prefix. * * @return string */ function wp_kama_rest_url_prefix_filter( $prefix ){ // filter... return $prefix; }
- $prefix(string)
- URL prefix.
Default: 'wp-json'
Changelog
Since 4.4.0 | Introduced. |
Where the hook is called
rest_url_prefix
wp-includes/rest-api.php 439
return apply_filters( 'rest_url_prefix', 'wp-json' );