Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #1244 from farlandlee/update-jqmigrate
Browse files Browse the repository at this point in the history
Update jQuery migrate to be compatible with jQuery v3.x and add option to enable jQuery migrate
  • Loading branch information
colin-marshall authored Mar 19, 2018
2 parents 0d45229 + fdb27b3 commit 54cdeb6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions library/enqueue-scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ function foundationpress_scripts() {
// CDN hosted jQuery placed in the header, as some plugins require that jQuery is loaded in the header.
wp_enqueue_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js', array(), '3.2.1', false );

// Deregister the jquery-migrate version bundled with WordPress.
wp_deregister_script( 'jquery-migrate' );

// CDN hosted jQuery migrate for compatibility with jQuery 3.x
wp_register_script( 'jquery-migrate', '//code.jquery.com/jquery-migrate-3.0.1.min.js', array('jquery'), '3.0.1', false );

// Enqueue jQuery migrate. Uncomment the line below to enable.
// wp_enqueue_script( 'jquery-migrate' );

// Enqueue Foundation scripts
wp_enqueue_script( 'foundation', get_template_directory_uri() . '/dist/assets/js/' . foundationpress_asset_path( 'app.js' ), array( 'jquery' ), '2.10.4', true );

Expand Down

0 comments on commit 54cdeb6

Please sign in to comment.