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

update jqmigrate to be compatible with jquery version used #1244

Merged
merged 1 commit into from
Mar 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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