lscwp-3rd-aelia-currencyswitcher.cls.php
8 years ago
lscwp-3rd-autoptimize.cls.php
8 years ago
lscwp-3rd-avada.cls.php
8 years ago
lscwp-3rd-bbpress.cls.php
8 years ago
lscwp-3rd-betterwp-minify.cls.php
8 years ago
lscwp-3rd-contact-form-7.cls.php
8 years ago
lscwp-3rd-like-dislike-counter.cls.php
8 years ago
lscwp-3rd-login-with-ajax.cls.php
8 years ago
lscwp-3rd-nextgengallery.cls.php
8 years ago
lscwp-3rd-theme-my-login.cls.php
8 years ago
lscwp-3rd-woocommerce.cls.php
8 years ago
lscwp-3rd-wp-polls.cls.php
8 years ago
lscwp-3rd-wp-postratings.cls.php
8 years ago
lscwp-3rd-wpforo.cls.php
8 years ago
lscwp-3rd-wplister.cls.php
8 years ago
lscwp-3rd-wptouch.cls.php
8 years ago
lscwp-3rd-yith-wishlist.cls.php
8 years ago
lscwp-registry-3rd.php
8 years ago
lscwp-3rd-contact-form-7.cls.php
47 lines
| 1 | <?php |
| 2 | /** |
| 3 | * The Third Party integration with Contact Form 7. |
| 4 | * |
| 5 | * @since 1.6.4 |
| 6 | * @package LiteSpeed_Cache |
| 7 | * @subpackage LiteSpeed_Cache/thirdparty |
| 8 | * @author LiteSpeed Technologies <info@litespeedtech.com> |
| 9 | */ |
| 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | die() ; |
| 12 | } |
| 13 | LiteSpeed_Cache_API::register( 'LiteSpeed_Cache_ThirdParty_Contact_Form_7' ) ; |
| 14 | |
| 15 | class LiteSpeed_Cache_ThirdParty_Contact_Form_7 |
| 16 | { |
| 17 | /** |
| 18 | * Detects if is active. |
| 19 | * |
| 20 | * @since 1.6.4 |
| 21 | * @access public |
| 22 | * |
| 23 | */ |
| 24 | public static function detect() |
| 25 | { |
| 26 | if ( defined( 'WPCF7_VERSION' ) ) { |
| 27 | add_action( 'rest_api_init', 'LiteSpeed_Cache_ThirdParty_Contact_Form_7::disable_vary_change' ) ; |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Disable vary change for refill to avoid auto-logout issue |
| 33 | * |
| 34 | * @since 1.6.4 |
| 35 | * @access public |
| 36 | */ |
| 37 | public static function disable_vary_change() |
| 38 | { |
| 39 | if ( strpos( $_SERVER[ 'REQUEST_URI' ], '/wp-json/contact-form-7' ) !== false ) { |
| 40 | LiteSpeed_Cache_API::debug( '3rd cf7 set no change vary' ) ; |
| 41 | add_filter( 'litespeed_can_change_vary', '__return_false' ) ; |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | } |
| 46 | |
| 47 |