Remove jQuery in the frontend for Twenty Fifteen.#1682
Conversation
| var $body, $window, $sidebar, resizeTimer, | ||
| secondary, button; | ||
| ( function() { | ||
| function domReady( callback ) { |
There was a problem hiding this comment.
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.
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.
sgomes
left a comment
There was a problem hiding this comment.
Great work removing jQuery where it's not needed 👍
Here's the first round of review comments.
|
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. |
|
This branch lives on a fork that can no longer be updated, so the trunk conflicts here can't be resolved in place. A refreshed version of this PR, merged with current trunk and with the review feedback above incorporated, is now up at #12410. |
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.