Last active
January 10, 2017 09:49
-
-
Save kprajapatii/4dd63b1eaa8ace3a358c2d07c6e012af to your computer and use it in GitHub Desktop.
Fix HTML 5 Map and GD booster caching
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
if (!function_exists('gd_geodir_booster_exclude_js')) { | |
// Fix HTML 5 Map and GD booster caching | |
function gd_geodir_booster_exclude_js( $continue, $content ) { | |
if (strpos($content, "uscanadahtml5map_js_data=true") !== false || strpos($content, "var BPLA_data = {") !== false || strpos($content, "callback=bp_location_profile.initMap") !== false || strpos($content, "/bp-location-autocomplete.min.js") !== false || strpos($content, "/jquery.js") !== false || (strpos($content, "new FlaShopUSCanadaMap(") !== false && strpos($content, "html5map_onclick(") !== false)) { | |
$continue = true; | |
} | |
return $continue; | |
} | |
} | |
add_filter( 'geodir_booster_script_continue', 'gd_geodir_booster_exclude_js', 11, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment