* Remove 'ver' from query string for scripts loaded from Google's * CDN * * @param string $src src attribute of script tag * @return string Updated src attribute */ function remove_ver_query($src) { if ($this->noconflict_next) { $this->noconflict_next = FALSE; echo "<script type='text/javascript'>try{jQuery.noConflict();}catch(e){};</script>\n"; } if (preg_match('/ajax\\.googleapis\\.com\\//', $src)) { $src = remove_query_arg('ver', $src); if (strpos($src, $this->google_scripts['jquery'][1] . ".js")) { $this->noconflict_next = TRUE; } } return $src; } static function remove_ver_query_filter($src) { $ugl = self::get_instance(); return $ugl->remove_ver_query($src); } } } //instantiate the class if (class_exists('JCP_UseGoogleLibraries')) { JCP_UseGoogleLibraries::configure_plugin(); }