Skip to content

Instantly share code, notes, and snippets.

@cheh
Created February 28, 2017 11:23
Show Gist options
  • Save cheh/1b61175101d6330e8c415d06d77c8df5 to your computer and use it in GitHub Desktop.
Save cheh/1b61175101d6330e8c415d06d77c8df5 to your computer and use it in GitHub Desktop.
Update jQuery Cherry Framework
// Add code below in your theme `includes/custom-function.php` file.
add_action( 'wp_enqueue_scripts', 'theme55574_back_latest_jquery', 10 );
function theme55574_back_latest_jquery() {
$suffix = SCRIPT_DEBUG ? '' : '.min';
wp_deregister_script( 'jquery' );
wp_deregister_script( 'migrate' );
wp_enqueue_script( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.12.4' );
wp_enqueue_script( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4' );
wp_enqueue_script( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment