-
Notifications
You must be signed in to change notification settings - Fork 815
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
Sharing: revert changes to echo inline sharing js #6641
Conversation
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.
Fixes the problem, plus does not cause regressions WRT #6339. Thanks!
I'm not sure I follow this. #6339 only moved the inline scripts to a later |
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.
OK, I forgot to test against the error that was caused by loading scripts in the footer, disregard my earlier review.
That's correct. This PR is only reverting the changes introduced in #6339, since they stopped Jetpack from outputting inline sharing scripts in the footer. |
@jeherve Looks like we're good, if we don't add back that unused jQuery call:
|
And a permanent fix is to ensure that all |
I have added wrapping of @kasparsd how do you find jQuery loading in the footer working for you? I'm having problems running my testing site like that because some themes try to use it in the header, notably TwentySeventeen. @jeherve how would you feel about that change going into the point release? cc @dereksmart @eliorivero for a second glance. You can find testing instructions in the description and comments to #6339 |
@zinigor Loading jQuery in the footer works fine now. @zinigor How about refactoring the popup opener to properly escape the |
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.
Works fine, 🐑
This PR needs more work and more testing, we can't include all this in 4.7.1 sadly. We will work on this one in the following release cycle, plus test all these changes in WordPress.com. We'll also see that all the scripts are properly escaping variables, remove all unneeded ones and clean up existing. Thanks for contributing to this @kasparsd , your input has been very helpful! I've taken a look at your work in your fork of Jetpack, feel free to create a PR against this repository, we'll take a look. |
@zinigor Yeah, this does feel like a major undertaking considering the amount of changes required to get rid of the inline jQuery calls. |
Closing this PR for now. @kasparsd It looks like you're making some good progress with kasparsd#1 Feel free to open a PR against automattic/jetpack when ready, we can continue from there! Thanks! |
Fixes #6640
Reverts changes introduced in #6339
$service->display_footer()
includes calls tojs_dialog
when not using Jetpack's Official sharing buttons.js_dialog
often useswp_add_inline_script()
, thus recreating the issues described in #6640.Testing instructions:
Proposed changelog entry for your changes:
cc @kasparsd who worked on the original PR.