Created
April 25, 2023 20:11
-
-
Save matty0501/17d75a8d84273d149d2ec266ffab7c22 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Prevent Gravity Perks Address Autocomplete scripts from being blocked by SiteGround Optimizer | |
*/ | |
add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' ); | |
function js_combine_exclude( $exclude_list ) { | |
$exclude_list[] = 'gp-address-autocomplete'; | |
$exclude_list[] = 'gp-address-autocomplete-google'; | |
$exclude_list[] = 'gp-address-autocomplete-map-field'; | |
return $exclude_list; | |
} | |
add_filter( 'sgo_js_async_exclude', 'js_async_exclude' ); | |
function js_async_exclude( $exclude_list ) { | |
$exclude_list[] = 'gp-address-autocomplete'; | |
$exclude_list[] = 'gp-address-autocomplete-google'; | |
$exclude_list[] = 'gp-address-autocomplete-map-field'; | |
return $exclude_list; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment