[wp-trac] [WordPress Trac] #45953: Jquery & Jquery UI update
WordPress Trac
noreply at wordpress.org
Sat Jan 12 22:37:58 UTC 2019
#45953: Jquery & Jquery UI update
-------------------------------------+-------------------------------------
Reporter: Webzzz | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: major | Resolution:
Keywords: needs-refresh needs- | Focuses: ui, accessibility,
dev-note needs-patch | javascript, performance, privacy,
| coding-standards
-------------------------------------+-------------------------------------
Comment (by Webzzz):
Hey, Thank you all for the quick responses.
My solution looks like a mix (a plugin + extra js file):
function rw_jquery_updater()
{
// jQuery
// Deregister core jQuery
wp_deregister_script('jquery');
// Register
wp_enqueue_script('jquery', plugins_url('/js/jquery-3.3.1.min.js',
__FILE__), false, '3.3.1');
// jQuery Migrate
// Deregister core jQuery Migrate
wp_deregister_script('jquery-migrate');
// Register
wp_enqueue_script('jquery-migrate', plugins_url('/js/jquery-
migrate-3.0.0.min.js', __FILE__), array(
'jquery'
), '3.0.0'); // require jquery, as loaded above
// Deregister UI jQuery
wp_deregister_script('jquery-ui-core');
// Register
wp_enqueue_script('jquery-ui-core', plugins_url('/js/jquery-
ui-1.12.1.min.js', __FILE__), false, '1.12.1');
}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45953#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list