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>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
/**
* Perfmatters
* https://perfmatters.io/
*/
if ( ! class_exists( 'BWFAN_Compatibility_With_Perfmatters' ) ) {
class BWFAN_Compatibility_With_Perfmatters {
public function __construct() {
add_filter( 'rest_jsonp_enabled', array( $this, 'bwfan_allow_rest_apis_with_perfmatters' ), 100 );
}
/**
* Allow Autonami and WooFunnels endpoints in rest calls
*
* @param $status
*
* @return mixed
*/
public function bwfan_allow_rest_apis_with_perfmatters( $status ) {
if ( ! is_array( $GLOBALS['wp']->query_vars ) || ! isset( $GLOBALS['wp']->query_vars['rest_route'] ) ) {
return $status;
}
$rest_route = $GLOBALS['wp']->query_vars['rest_route'];
if ( strpos( $rest_route, 'autonami' ) !== false || strpos( $rest_route, 'woofunnel' ) !== false ) {
remove_filter( 'rest_authentication_errors', 'perfmatters_rest_authentication_errors', 20 );
}
return $status;
}
}
new BWFAN_Compatibility_With_Perfmatters();
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* Force Login
* https://wordpress.org/plugins/wp-force-login/
*/
if ( ! class_exists( 'BWFAN_Compatibility_With_Force_Login' ) ) {
class BWFAN_Compatibility_With_Force_Login {
public function __construct() {
add_filter( 'rest_jsonp_enabled', array( $this, 'bwfan_allow_rest_apis_with_force_login' ), 100 );
}
/**
* Allow Autonami and WooFunnels endpoints in rest calls
*
* @param $status
*
* @return mixed
*/
public function bwfan_allow_rest_apis_with_force_login( $status ) {
$rest_route = $GLOBALS['wp']->query_vars['rest_route'];
if ( false !== strpos( $rest_route, 'autonami' ) || false !== strpos( $rest_route, 'woofunnel' ) || false !== strpos( $rest_route, 'funnelkit' ) ) {
remove_filter( 'rest_authentication_errors', 'v_forcelogin_rest_access', 99 );
}
return $status;
}
}
new BWFAN_Compatibility_With_Force_Login();
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* Logged-in-only
* https://wordpress.org/plugins/wp-logged-in-only/
*/
if ( ! class_exists( 'BWFAN_Compatibility_With_Logged_In_Only' ) ) {
class BWFAN_Compatibility_With_Logged_In_Only {
public function __construct() {
add_filter( 'rest_jsonp_enabled', array( $this, 'bwfan_allow_rest_apis' ), 100 );
}
/**
* Allow Autonami and WooFunnels endpoints in rest calls
*
* @param $status
*
* @return mixed
*/
public function bwfan_allow_rest_apis( $status ) {
$rest_route = $GLOBALS['wp']->query_vars['rest_route'];
if ( false !== strpos( $rest_route, 'autonami' ) || false !== strpos( $rest_route, 'woofunnel' ) || false !== strpos( $rest_route, 'funnelkit' ) ) {
remove_filter( 'rest_authentication_errors', 'logged_in_only_rest_api' );
}
return $status;
}
}
new BWFAN_Compatibility_With_Logged_In_Only();
}

View File

@@ -0,0 +1,37 @@
<?php
/**
* Password Protected
* https://wordpress.org/plugins/password-protected/
*/
if ( ! class_exists( 'BWFAN_Compatibility_With_Password_Protected' ) ) {
class BWFAN_Compatibility_With_Password_Protected {
public function __construct() {
add_filter( 'password_protected_is_active', array( $this, 'bwfan_allow_rest_api_password_protected' ), 100 );
}
/**
* Allow Autonami and WooFunnels endpoints in rest calls
*
* @param $status
*
* @return false|mixed
*/
public function bwfan_allow_rest_api_password_protected( $status ) {
$rest_route = isset( $GLOBALS['wp']->query_vars['rest_route'] ) ? $GLOBALS['wp']->query_vars['rest_route'] : '';
if ( empty( $rest_route ) ) {
return $status;
}
if ( strpos( $rest_route, 'autonami' ) !== false || strpos( $rest_route, 'woofunnel' ) !== false ) {
return false;
}
return $status;
}
}
new BWFAN_Compatibility_With_Password_Protected();
}

View File

@@ -0,0 +1,40 @@
<?php
/**
* ATUM WooCommerce Inventory Management and Stock Tracking
* By Stock Management Labs
* https://wordpress.org/plugins/atum-stock-manager-for-woocommerce/
*/
if ( ! class_exists( 'BWFAN_Compatibility_With_Atom_Stock_Manager' ) ) {
class BWFAN_Compatibility_With_Atom_Stock_Manager {
public function __construct() {
add_action( 'action_scheduler_failed_action', [ $this, 'unhook_atom_stock_manager' ], 9, 2 );
}
/**
* Remove atom stock manager hook
*
* @param $action_id
* @param $timeout
*
* @return void
*/
public function unhook_atom_stock_manager( $action_id, $timeout ) {
$rest_route = filter_input( INPUT_GET, 'rest_route' );
if ( empty( $rest_route ) ) {
$rest_route = $_SERVER['REQUEST_URI'] ?? '';
}
if ( empty( $rest_route ) ) {
return;
}
$rest_route = bwf_clean( $rest_route );
if ( false !== strpos( $rest_route, '/woofunnels/v1/worker' ) || false !== strpos( $rest_route, '/autonami/v2/worker' ) || false !== strpos( $rest_route, '/autonami/v1/worker' ) ) {
BWFAN_Common::remove_actions( 'action_scheduler_failed_action', 'Atum\Api\AtumApi', 'maybe_retry_full_export_action' );
}
}
}
new BWFAN_Compatibility_With_Atom_Stock_Manager();
}

View File

@@ -0,0 +1,36 @@
<?php
/**
* Breeze
*
* https://wordpress.org/plugins/breeze/
*/
if ( ! class_exists( 'BWFAN_Compatibility_With_Breeze_Cache' ) ) {
class BWFAN_Compatibility_With_Breeze_Cache {
public function __construct() {
add_filter( 'option_breeze_advanced_settings', array( $this, 'exclude_autonami_endpoint_urls' ), 999 );
}
/**
* Exclude Autonami endpoints from cache
*
* @param $options
*
* @return mixed
*/
public function exclude_autonami_endpoint_urls( $options ) {
$new_urls = [ site_url( 'wp-json/' . BWFAN_API_NAMESPACE . '/*' ), site_url( 'wp-json/woofunnels/*' ), site_url( 'wp-json/funnelkit-automations/*' ) ];
$excluded_urls = isset( $options['breeze-exclude-urls'] ) && is_array( $options['breeze-exclude-urls'] ) ? $options['breeze-exclude-urls'] : [];
$excluded_urls = array_unique( array_merge( $new_urls, $excluded_urls ) );
sort( $excluded_urls );
$options['breeze-exclude-urls'] = $excluded_urls;
return $options;
}
}
new BWFAN_Compatibility_With_Breeze_Cache();
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* Clearfy Pro
* https://wpshop.ru/plugins/clearfy
*/
if ( ! class_exists( 'BWFAN_Compatibility_With_Clearfy' ) ) {
class BWFAN_Compatibility_With_Clearfy {
public function __construct() {
add_filter( 'clearfy_rest_api_white_list', array( $this, 'bwfan_whitelist_autonami_endpoints' ), 10, 1 );
}
/** white list autonami endpoints in clearfy pro plugin
*
* @param $white_list
*
* @return mixed
*/
public function bwfan_whitelist_autonami_endpoints( $white_list ) {
$white_list[] = 'woofunnels';
$white_list[] = 'woofunnels-admin';
$white_list[] = BWFAN_API_NAMESPACE;
$white_list[] = 'autonami-webhook';
$white_list[] = 'woofunnels-analytics';
$white_list[] = 'autonami';
$white_list[] = 'funnelkit-automations';
return $white_list;
}
}
new BWFAN_Compatibility_With_Clearfy();
}

View File

@@ -0,0 +1,37 @@
<?php
/**
* Image Optimizer Optimize Images and Convert to WebP or AVIF
* By Elementor
* https://wordpress.org/plugins/image-optimization/
*/
if ( ! class_exists( 'BWFAN_Compatibility_With_Image_Optimization' ) ) {
class BWFAN_Compatibility_With_Image_Optimization {
public function __construct() {
add_action( 'action_scheduler_init', [ $this, 'remove_image_optimization_hook' ], 9 );
}
/**
* Remove image optimisation hook
*
* @return void
*/
public function remove_image_optimization_hook() {
$rest_route = filter_input( INPUT_GET, 'rest_route' );
if ( empty( $rest_route ) ) {
$rest_route = $_SERVER['REQUEST_URI'] ?? '';
}
if ( empty( $rest_route ) ) {
return;
}
$rest_route = bwf_clean( $rest_route );
if ( false !== strpos( $rest_route, '/woofunnels/v1/worker' ) || false !== strpos( $rest_route, '/autonami/v2/worker' ) || false !== strpos( $rest_route, '/autonami/v1/worker' ) ) {
BWFAN_Common::remove_actions( 'action_scheduler_init', 'ImageOptimization\Modules\Optimization\Components\Actions_Cleanup', 'schedule_cleanup' );
}
}
}
new BWFAN_Compatibility_With_Image_Optimization();
}

View File

@@ -0,0 +1,61 @@
<?php
/**
* Security & Malware scan by CleanTalk
* https://wordpress.org/plugins/security-malware-firewall/
*/
if ( ! class_exists( 'BWFAN_Compatibility_With_Security_By_CleanTalk' ) ) {
class BWFAN_Compatibility_With_Security_By_CleanTalk {
public function __construct() {
add_filter( 'rest_jsonp_enabled', array( $this, 'bwfan_allow_rest_apis_with_force_login' ), 100 );
}
/**
* Allow FKA and FB endpoints in the rest calls
*
* @param $status
*
* @return mixed
*/
public function bwfan_allow_rest_apis_with_force_login( $status ) {
global $spbc;
if ( empty( $spbc ) || ( ! $spbc instanceof CleantalkSP\SpbctWP\State ) || empty( $spbc->settings['wp__disable_rest_api_for_non_authenticated'] ) ) {
return $status;
}
try {
$rest_route = $_GET['rest_route'] ?? '';
$rest_route = empty( $rest_route ) ? $_SERVER['REQUEST_URI'] : $rest_route;
if ( empty( $rest_route ) ) {
return $status;
}
if ( false === strpos( $rest_route, 'autonami' ) && false === strpos( $rest_route, 'woofunnel' ) && false === strpos( $rest_route, 'funnelkit' ) ) {
return $status;
}
$auth_errors_hooks = BWFAN_Common::get_list_of_attach_actions( 'rest_authentication_errors' );
if ( ! is_array( $auth_errors_hooks ) || count( $auth_errors_hooks ) == 0 ) {
return $status;
}
global $wp_filter;
foreach ( $auth_errors_hooks as $value ) {
if ( ! isset( $value['function_path'] ) ) {
continue;
}
if ( false !== strpos( $value['function_path'], '/security-malware-firewall' ) && isset( $wp_filter['rest_authentication_errors']->callbacks[ $value['priority'] ][ $value['index'] ] ) ) {
unset( $wp_filter['rest_authentication_errors']->callbacks[ $value['priority'] ][ $value['index'] ] );
}
}
} catch ( Error|Exception $e ) {
return $status;
}
return $status;
}
}
new BWFAN_Compatibility_With_Security_By_CleanTalk();
}

View File

@@ -0,0 +1,36 @@
<?php
/**
* SiteGround Optimizer
*
* https://wordpress.org/plugins/sg-cachepress/
*/
if ( ! class_exists( 'BWFAN_Compatibility_With_SG_Cache' ) ) {
class BWFAN_Compatibility_With_SG_Cache {
public function __construct() {
/** Exclude FK endpoints from cache */
add_filter( 'option_siteground_optimizer_excluded_urls', array( $this, 'exclude_endpoints' ), PHP_INT_MAX );
add_filter( 'default_option_siteground_optimizer_excluded_urls', array( $this, 'exclude_endpoints' ), PHP_INT_MAX );
}
/**
* Exclude endpoints from SiteGround cache
*
* @param $value
*
* @return array|mixed
*/
public function exclude_endpoints( $value ) {
$value = BWFAN_Common::make_array( $value );
$value[] = "/wp-json/" . BWFAN_API_NAMESPACE . "/*";
$value[] = "/wp-json/woofunnels/*";
$value[] = "/wp-json/funnelkit-automations/*";
return BWFAN_Common::unique( $value );
}
}
new BWFAN_Compatibility_With_SG_Cache();
}

View File

@@ -0,0 +1,31 @@
<?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();
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Wp-Rocket
*
* https://wp-rocket.me/
*/
if ( ! class_exists( 'BWFAN_Compatibility_With_Wp_Rocket' ) ) {
class BWFAN_Compatibility_With_Wp_Rocket {
public function __construct() {
add_filter( 'rocket_cache_reject_uri', array( $this, 'exclude_autonami_endpoint_option' ), 100 );
}
/**
* Exclude Autonami and WooFunnels endpoints from wp-rocket cache
*
* @param $uris
*
* @return mixed
*/
public function exclude_autonami_endpoint_option( $uris ) {
$uris[] = "/wp-json/" . BWFAN_API_NAMESPACE . "/*";
$uris[] = "/wp-json/woofunnels/*";
$uris[] = "/wp-json/funnelkit-automations/*";
return $uris;
}
}
new BWFAN_Compatibility_With_Wp_Rocket();
}

View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.