Files
roi-theme/wp-content/plugins/wp-marketing-automations/compatibilities/rest/class-bwfan-compatibility-with-wp-rest-authenticate.php
root a22573bf0b Commit inicial - WordPress Análisis de Precios Unitarios
- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:04:30 -06:00

32 lines
828 B
PHP
Executable File

<?php
/**
* WordPress REST API Authentication
* By miniOrange
* https://wordpress.org/plugins/wp-rest-api-authentication/
*/
if ( ! class_exists( 'BWFAN_Compatibility_With_WP_Rest_Authenticate' ) ) {
class BWFAN_Compatibility_With_WP_Rest_Authenticate {
public function __construct() {
add_filter( 'dra_allow_rest_api', [ $this, 'bwfan_allow_rest_apis' ] );
}
/**
* Allow Autonami and WooFunnels endpoints in rest calls
*
* @return bool
*/
public function bwfan_allow_rest_apis() {
$rest_route = $GLOBALS['wp']->query_vars['rest_route'];
if ( false !== strpos( $rest_route, 'autonami' ) || false !== strpos( $rest_route, 'woofunnel' ) || false !== strpos( $rest_route, 'funnelkit' ) ) {
return true;
}
return false;
}
}
new BWFAN_Compatibility_With_WP_Rest_Authenticate();
}