Created
January 14, 2015 03:08
-
-
Save jacks0n/e58af756a5eaf2f28025 to your computer and use it in GitHub Desktop.
Remove/un-enqueue the jQuery migrate file, which is often not required.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Removes the jquery-migrate file, often not-required. | |
*/ | |
add_filter('wp_default_scripts', 'remove_jquery_migrate'); | |
function remove_jquery_migrate(&$scripts) | |
{ | |
if (!is_admin()) { | |
$scripts->remove('jquery'); | |
$scripts->add('jquery', false, array('jquery-core'), ''); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment