Action: DevOwl/Utils/RestObfuscatePath

do_action( 'DevOwl/Utils/RestObfuscatePath', $enabled )

This filter allows to enable or disable the obfuscated wp-json/... pathes.

Currently, the obfuscating is disabled by default for the following plugins:

WP Cerber (https://wordpress.org/plugins/wp-cerber/)

Technically, WP Cerber uses $_REQUEST['rest_route'] instead of https://github.com/WordPress/WordPress/blob/fe6b65c44b929ee5583f6146d92388ef43061f9a/wp-includes/rest-api.php#L390, which is the default WordPress API to do so. Also, the cerber_access_control() function, which blocks the REST API requests, is executed at init time, instead of https://developer.wordpress.org/reference/hooks/rest_api_init/ or even better: https://developer.wordpress.org/reference/hooks/rest_authentication_errors/

mqTranslate (https://wordpress.org/plugins/mqtranslate/)

It modifies the way how the request hook works to rewrite translation URLs. As it is an outdated plugin, we simply deactivate the obfuscation for this plugin.

Parameters:
Name Type Description
$enabled boolean
Since:
  • 1.13.3
Example

Disable REST obfuscation

<?php
add_filter('DevOwl/Utils/RestObfuscatePath', '__return_false');