| @@ -66,12 +66,8 @@ | ||
| 66 | 66 | // LiteSpeed: Exclude Forms from JS defer. |
| 67 | 67 | add_filter( 'convertkit_output_script_footer', array( $this, 'litespeed_cache_exclude_js_defer' ) ); |
| 68 | 68 | add_filter( 'convertkit_resource_forms_output_script', array( $this, 'litespeed_cache_exclude_js_defer' ) ); |
| 69 | 69 | |
| 70 | - // LiteSpeed: Exclude Forms from JS optimization. | |
| 71 | - add_filter( 'convertkit_output_script_footer', array( $this, 'litespeed_cache_exclude_js_optimize' ) ); | |
| 72 | - add_filter( 'convertkit_resource_forms_output_script', array( $this, 'litespeed_cache_exclude_js_optimize' ) ); | |
| 73 | - | |
| 74 | 70 | // Perfmatters: Exclude Forms from Delay JavaScript. |
| 75 | 71 | add_filter( 'convertkit_output_script_footer', array( $this, 'perfmatters_exclude_delay_js' ) ); |
| 76 | 72 | add_filter( 'convertkit_resource_forms_output_script', array( $this, 'perfmatters_exclude_delay_js' ) ); |
| 77 | 73 | add_filter( 'perfmatters_lazyload', array( $this, 'disable_image_lazy_loading_on_landing_pages' ) ); |
| @@ -79,11 +75,8 @@ | ||
| 79 | 75 | // Siteground Speed Optimizer: Exclude Forms from JS combine. |
| 80 | 76 | add_filter( 'convertkit_output_script_footer', array( $this, 'siteground_speed_optimizer_exclude_js_combine' ) ); |
| 81 | 77 | add_filter( 'convertkit_resource_forms_output_script', array( $this, 'siteground_speed_optimizer_exclude_js_combine' ) ); |
| 82 | 78 | |
| 83 | - // Siteground Speed Optimizer: Set Member Content Pages in "Exclude URLs from Caching". | |
| 84 | - add_filter( 'sgo_exclude_urls_from_cache', array( $this, 'exclude_restrict_content_pages_from_caching' ) ); | |
| 85 | - | |
| 86 | 79 | // Rocket LazyLoad: Exclude images from lazy loading. |
| 87 | 80 | add_filter( 'rocket_lazyload_excluded_src', array( $this, 'exclude_hosts' ) ); |
| 88 | 81 | |
| 89 | 82 | // WP Rocket: Disable Caching and Minification on Landing Pages. |
| @@ -163,28 +156,8 @@ | ||
| 163 | 156 | |
| 164 | 157 | } |
| 165 | 158 | |
| 166 | 159 | /** |
| 167 | - * Disable JS Optimization on Kit scripts when the LiteSpeed Cache Plugin is installed, active | |
| 168 | - * and its "JS Combine" setting is enabled. | |
| 169 | - * | |
| 170 | - * @since 3.3.1 | |
| 171 | - * | |
| 172 | - * @param array $script Script key/value pairs to output as <script> tag. | |
| 173 | - * @return array | |
| 174 | - */ | |
| 175 | - public function litespeed_cache_exclude_js_optimize( $script ) { | |
| 176 | - | |
| 177 | - return array_merge( | |
| 178 | - $script, | |
| 179 | - array( | |
| 180 | - 'data-no-optimize' => '1', | |
| 181 | - ) | |
| 182 | - ); | |
| 183 | - | |
| 184 | - } | |
| 185 | - | |
| 186 | - /** | |
| 187 | 160 | * Exclude ConvertKit scripts from Perfmatters' "Delay JS" setting. |
| 188 | 161 | * |
| 189 | 162 | * @since 2.4.7 |
| 190 | 163 | * |
| @@ -339,35 +312,8 @@ | ||
| 339 | 312 | */ |
| 340 | 313 | public function exclude_local_js_from_minification( $scripts ) { |
| 341 | 314 | |
| 342 | 315 | return array_merge( $scripts, $this->exclude_plugin_js ); |
| 343 | - | |
| 344 | - } | |
| 345 | - | |
| 346 | - /** | |
| 347 | - * Exclude Restrict Content Pages from caching when the Siteground Speed Optimizer Plugin is installed, active | |
| 348 | - * and its "Exclude URLs from Caching" setting is enabled. | |
| 349 | - * | |
| 350 | - * @since 3.3.6 | |
| 351 | - * | |
| 352 | - * @param array $excluded_urls URLs to exclude from caching. | |
| 353 | - * @return array | |
| 354 | - */ | |
| 355 | - public function exclude_restrict_content_pages_from_caching( $excluded_urls ) { | |
| 356 | - | |
| 357 | - // Get the list of relative URLs for posts with restrict_content enabled | |
| 358 | - // from the Plugin's cache. | |
| 359 | - $restrict_content_cache = WP_ConvertKit()->get_class( 'restrict_content_cache' ); | |
| 360 | - if ( ! $restrict_content_cache ) { | |
| 361 | - return $excluded_urls; | |
| 362 | - } | |
| 363 | - | |
| 364 | - // Cache stores Restrict Content pages as id => relative url pairs. | |
| 365 | - // Siteground just needs to the relative URLs. | |
| 366 | - $restrict_content_urls = array_values( $restrict_content_cache->get() ); | |
| 367 | - | |
| 368 | - // Merge the list of relative URLs with the list of URLs already excluded from caching. | |
| 369 | - return array_merge( $excluded_urls, $restrict_content_urls ); | |
| 370 | 316 | |
| 371 | 317 | } |
| 372 | 318 | |
| 373 | 319 | } |