rest_url_prefix filter-hookWP 4.4.0

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_get_url_prefix()
rest_url_prefix
wp-includes/rest-api.php 449
return apply_filters( 'rest_url_prefix', 'wp-json' );

Where the hook is used in WordPress

Usage not found.