Load internal jquery and jquery-migrate scripts instead of using googleapis

This commit is contained in:
Silvan Calarco 2018-07-28 18:19:46 +02:00
parent 7d44cf61cb
commit 74adf9f24c
3 changed files with 11 additions and 2 deletions

View File

@ -28,10 +28,11 @@ function add_custom_scripts() {
if($_SERVER['HTTPS']=='on') {
$protocol='https:';
}
wp_register_script('jquery', $protocol.'//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3');
$output .= "<script type=\"text/javascript\" src=\"" . get_stylesheet_directory_uri() . "/scripts/jquery.cookiebar.js\"></script>\n";
wp_register_script('jquery', get_stylesheet_directory_uri() . "/scripts/jquery.min.js", false, '1.11.3');
wp_enqueue_script('jquery');
$JQUERY_LOADED = true;
wp_register_script('jquerymigrate', $protocol.'//code.jquery.com/jquery-migrate-1.2.1.min.js', false, '1.2.1');
wp_register_script('jquerymigrate', get_stylesheet_directory_uri() . "/scripts/jquery-migrate-1.2.1.min.js", false, '1.2.1');
wp_enqueue_script('jquerymigrate');
}
add_action('template_redirect', 'add_custom_scripts');

2
scripts/jquery-migrate-1.2.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

6
scripts/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long