-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove jQuery in the frontend for Twenty Fifteen. #1682
base: trunk
Are you sure you want to change the base?
Conversation
var $body, $window, $sidebar, resizeTimer, | ||
secondary, button; | ||
( function() { | ||
function domReady( callback ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally, replace this with our domReady package, which should be available at wp.domReady
after enqueueing "wp-dom-ready".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a perfect world I'd agree, but it would mean we have to bump the minimum required WordPress version of Twenty Fifteen which is currently 4.1. Given how widely it's probably still used on old sites I'd argue this may not be enough of a benefit to justify a bump.
But for newer themes for sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work removing jQuery
where it's not needed 👍
Here's the first round of review comments.
src/wp-content/themes/twentyfifteen/js/keyboard-image-navigation.js
Outdated
Show resolved
Hide resolved
Adding a note that after these changes, the JS will no longer work correctly in IE 11. I'm not sure whether this is a concern, given that on the one hand we've deprecated it, but on the other hand we may want to preserve this theme working correctly in older versions of WordPress and their supported browsers. |
@sgomes Thanks for the review! I addressed your feedback via code updates and comments above. |
Trac ticket: https://core.trac.wordpress.org/ticket/54172
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.