- 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>
31 lines
813 B
PHP
Executable File
31 lines
813 B
PHP
Executable File
<?php
|
|
|
|
/**
|
|
* WP OAuth Server
|
|
* https://wordpress.org/plugins/oauth2-provider/
|
|
*/
|
|
if ( ! class_exists( 'BWFAN_Compatibility_With_WP_Oauth' ) ) {
|
|
class BWFAN_Compatibility_With_WP_Oauth {
|
|
|
|
public function __construct() {
|
|
add_filter( 'rest_jsonp_enabled', array( $this, 'bwfan_allow_rest_apis_with_wp_oauth' ) );
|
|
}
|
|
|
|
/**
|
|
* @param $status
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function bwfan_allow_rest_apis_with_wp_oauth( $status ) {
|
|
$rest_route = $GLOBALS['wp']->query_vars['rest_route'];
|
|
if ( strpos( $rest_route, 'autonami' ) !== false || strpos( $rest_route, 'woofunnel' ) !== false ) {
|
|
BWFAN_Common::remove_actions( 'rest_authentication_errors', 'WO_Server', 'wpoauth_block_unauthenticated_rest_requests' );
|
|
}
|
|
|
|
return $status;
|
|
}
|
|
}
|
|
|
|
new BWFAN_Compatibility_With_WP_Oauth();
|
|
}
|