<?php
/*
Plugin Name: my jQuery enqueue
Version: 1.0
*/
function my_jquery_enqueue() {
wp_deregister_script('jquery');
wp_enqueue_script('jquery', plugins_url('/js/jquery-2.0.3.min.js', __FILE__), false, '2.0.3');
wp_enqueue_script('jquery-migrate', plugins_url('/js/jquery-migrate-1.2.1.min.js', __FILE__), array('jquery'), '1.2.1');
}
add_action('wp_enqueue_scripts', 'my_jquery_enqueue');
?>
Проблемът е че ако успееш да го обновиш има шанс да спре да работи нещото което го ползва - я слайдър, я някоя добавка.
wp_enqueue_script('jquery-migrate', plugins_url('/js/jquery-migrate-1.2.1.min.js', __FILE__), array('jquery'), '1.2.1');
The uncompressed development version of the jQuery Migrate plugin includes console log output to warn when specific deprecated and/or removed features are being used. This makes it valuable as a migration debugging tool for finding and remediating issues in existing jQuery code and plugins. It can be used for its diagnostics with versions of jQuery core all the way back to 1.6.4.