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'.


Top ↑

Source

File: wp-includes/rest-api.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More