Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add this file in the `/wp-content/mu-plugins/` directory in it will automatically be loaded by WordPress
<?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' );
@andreilupu

This comment has been minimized.

Copy link
Owner Author

@andreilupu andreilupu commented Dec 4, 2017

Actually removing jquery.migrate is a bad practice and may trigger some javascript errros.
Consider an error mute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment