Returning empty rest_url_prefix creates a crash
-
In rest-api.php, the function rest_output_link_wp_head() calls get_rest_url() to fetch the REST URL. If that function returns empty, it exits.
So if I wanted to prevent the https://api.w.org/.. header output, I assumed I could use the rest_url filter to handle that.
But when I do hook that filter, and return an empty string, nothing seems to change. What am I doing wrong?
(I understand that it’s not a good idea to entirely disable the WordPress REST API.)
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Returning empty rest_url_prefix creates a crash’ is closed to new replies.