<span class="resolved" aria-label="Resolved" title="Topic is resolved."></span>Custom ‘rest_url_prefix’

Replies: 1

I change the default Rest API prefix from ‘wp-json’ to ‘api’ using this filter in a mu-plugin.

<?php
function wpr_rest_api_prefix ()
{
return 'api';
}
add_filter( 'rest_url_prefix', 'wpr_rest_api_prefix');

And I think this plugin does not detect this. Because nothing is listed in ‘Endpoint API caches’.

If I’m right, can you add this feature, please? Thanks in advance.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer