Skip to content

Instantly share code, notes, and snippets.

@shinmai
Created October 10, 2016 13:21
Show Gist options
  • Save shinmai/7d5fdbb855850c526af5ae2b36613492 to your computer and use it in GitHub Desktop.
Save shinmai/7d5fdbb855850c526af5ae2b36613492 to your computer and use it in GitHub Desktop.
Don't include migrate.js in production, if you know you won't need it.
/**
* Expat
* Don't include migrate.js in production, if you know you won't need it.
* @param string &$scripts enqueued scripts
* @version 0.1.0
* @link https://gist.github.com/shinmai/7d5fdbb855850c526af5ae2b36613492
* @license http://www.wtfpl.net/txt/copying/ WTFPL
* @author Aapo Saaristo <aapo.saaristo@gmail.com>
*/
function expat( &$scripts){
if(is_admin()) return;
$scripts->remove( 'jquery');
$scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' );
}
//add_filter( 'wp_default_scripts', 'expat' ); // Uncomment to enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment