-
Notifications
You must be signed in to change notification settings - Fork 799
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 Service: Make sure we only check for legacy sharing buttons implementation on non-block themes #39349
Sharing Service: Make sure we only check for legacy sharing buttons implementation on non-block themes #39349
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
c3daab6
to
49f6179
Compare
49f6179
to
313ddaa
Compare
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.
Part of me wonders if we shouldn't take that opportunity to be way more aggressive, and shortcircuit all of the sharing feature when you use a block-based theme. Ideally you really shouldn't be using the legacy buttons in a block-based theme, you should be using the sharing block instead.
We already recommend that people use the sharing block instead:
After merging this PR, maybe we could spin up a small project to more strongly redirect folks to the sharing block?
projects/plugins/jetpack/modules/sharedaddy/sharing-service.php
Outdated
Show resolved
Hide resolved
Tracking here |
Makes it so we only check for the need to load legacy sharing assets if we're on an old theme
Saves a call to
get_option( 'sharing-services' )
for modern themes in the frontend.Proposed changes:
sharing_should_load_legacy_sharing_buttons()
that checks if the theme is a modern themesharing_add_header()
to check withsharing_should_load_legacy_sharing_buttons()
before checking if it should load the sharing assets in the frontendOther information:
Jetpack product discussion
pdWQjU-Ub-p2
Does this pull request change what data or activity we track or use?
No
Testing instructions: