Files
roi-theme/wp-content/plugins/wp-marketing-automations/compatibilities/rest/class-bwfan-compatibility-with-sg-cache.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

37 lines
958 B
PHP
Executable File

<?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();
}