Skip to content

Instantly share code, notes, and snippets.

@fongreecss
Created May 9, 2016 12:14
Show Gist options
  • Save fongreecss/9a745739bb0f049d9d1b248cf4849e96 to your computer and use it in GitHub Desktop.
Save fongreecss/9a745739bb0f049d9d1b248cf4849e96 to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: Dequery
* Plugin URI: http://frasaleksander.github.io
* Description: Deregister new jquery and use the old one + migrate. Stocholm theme quickfix
* Version: 0.0.1
* Author: Aleksander Fras
* Author URI: http://frasaleksander.github.io
* License: GPL2
*/
if(!function_exists('dequery_scripts')) {
function dequery_scripts() {
wp_deregister_script('jquery');
wp_register_script('jquery', plugin_dir_url( __FILE__ ) . 'jquery-1.11.3.min.js', array());
wp_deregister_script('jquery-migrate');
wp_register_script('jquery-migrate', plugin_dir_url( __FILE__ ) . 'jquery-migrate-1.2.1.min.js', array('jquery'));
wp_enqueue_script('jquery-migrate');
wp_enqueue_script('jquery');
}
add_action( 'wp_enqueue_scripts', 'dequery_scripts' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment