Created
May 7, 2017 12:12
-
-
Save andreilupu/2f16d752b06e7ddb8ba94e40f8b592a6 to your computer and use it in GitHub Desktop.
Add this file in the `/wp-content/mu-plugins/` directory in it will automatically be loaded by WordPress
This file contains 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 | |
function disable_jquerymigrate_warning( $scripts ) { | |
if ( ! empty( $scripts->registered['jquery'] ) ) { | |
$scripts->registered['jquery']->deps = array_diff( $scripts->registered['jquery']->deps, array( 'jquery-migrate' ) ); | |
} | |
} | |
add_action( 'wp_default_scripts', 'disable_jquerymigrate_warning' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Actually removing jquery.migrate is a bad practice and may trigger some javascript errros.
Consider an error mute