For more context:
It seems that it's rather easy to change
wp-json to anything.
I'm passing this link to my custom route to the JS file through localization:
$params = [ 'rest_link' => esc_url( get_site_url() . '/wp-json/block_help/v1/block_identification?block_identifier=' ) ]; wp_localize_script( $handle, 'block_help_data', $params );
But I wonder, is it correct to also add the
/wp-json/ to the hard-coded link as well? Most likely not, but if so -
Isn't there any
get_json_prefix function that I can use to retrieve whatever the new prefix is?