Disable jQuery Migrate in WordPress.
/**
* Disable jQuery Migrate in WordPress.
*
* @author Guy Dumais.
* @link https://en.guydumais.digital/disable-jquery-migrate-in-wordpress/
*/
add_filter( 'wp_default_scripts', $af = static function( &$scripts) {
if(!is_admin()) {
$scripts->remove( 'jquery');
$scripts->add( 'jquery', false, array( 'jquery-core' ), '1.12.4' );
}
}, PHP_INT_MAX );
unset( $af );