Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter Jevedor

    (@jevedor)

    in theme file theme/boilerplate/boilerplate-admin/admin-menu.php line 479

    //	$options['H5BP_jquery_js']
    		if ( ! function_exists( 'H5BP_add_jquery_script' ) ):
    			function H5BP_add_jquery_script() {
    				$cache = H5BP_cache_buster();
    				$options = get_option('plugin_options');
    				$version = ($options['H5BP_jquery_version']) ? $options['H5BP_jquery_version'] : '1.10.2';
    				wp_deregister_script( 'jquery' ); // get rid of WP's jQuery
    				echo '<script src="//ajax.googleapis.com/ajax/libs/jquery/'.$version.'/jquery.min.js"></script>'.PHP_EOL; // try getting from CDN
    				echo '<script>window.jQuery || document.write(unescape(\'%3Cscript src="' .H5BP_URL. '/js/jquery.js'.$cache.'"%3E%3C/script%3E\'))</script>'.PHP_EOL; // fallback to local if CDN fails
    			}
    		endif; // H5BP_add_jquery_script

    It deregisters jquery so that it can add it in at the bottom in the footer.

Viewing 1 replies (of 1 total)