Skip to content

Sharing: show legacy settings on block themes so users can disable sharing#50257

Open
shsajalchowdhury wants to merge 2 commits into
Automattic:trunkfrom
shsajalchowdhury:fix/sharing-buttons-block-theme-toggle
Open

Sharing: show legacy settings on block themes so users can disable sharing#50257
shsajalchowdhury wants to merge 2 commits into
Automattic:trunkfrom
shsajalchowdhury:fix/sharing-buttons-block-theme-toggle

Conversation

@shsajalchowdhury

@shsajalchowdhury shsajalchowdhury commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What

Fixes #49495

Why

When a block-based theme is active on a self-hosted Jetpack site, the Sharing settings page (Settings > Sharing) replaces the full services configuration UI with only a Site Editor prompt. This hides all controls for managing legacy sharing buttons, making it impossible for users to disable the sharing buttons that are automatically appended to post content via the_content filter.

Users have to switch back to a classic theme, disable sharing, then switch back to their block theme — which is a poor UX.

How

Instead of replacing services_config_display() with sharing_block_display(), show both:

  1. The block theme message/prompt (encouraging use of the Sharing block)
  2. The full legacy services config (so users can manage/disable existing sharing buttons)

Testing Instructions

  1. Activate a block-based theme (e.g., Twenty Twenty-Four)
  2. Enable Jetpack Sharing module
  3. Go to Settings > Sharing
  4. Before: Only see a "Go to the site editor" prompt with no way to disable legacy sharing buttons
  5. After: See the block theme prompt AND the full services configuration below it, including the ability to remove sharing services and disable content-appended buttons
  6. Disable all sharing services and verify buttons no longer appear on posts

Changelog

Sharing: ensure legacy sharing settings remain accessible on block themes so users can disable sharing buttons appended to content.

Does this pull request change what data or activity we track or use?

No. This change only modifies what UI is shown on the Sharing settings page — no data collection or tracking changes.

Testing instructions

  1. Activate a block-based theme (e.g., Twenty Twenty-Four)
  2. Enable the Jetpack Sharing module
  3. Go to Settings > Sharing
  4. Before: Only a "Go to the site editor" prompt is shown with no way to disable legacy sharing buttons
  5. After: The block theme prompt appears AND the full services configuration is displayed below it — you can remove sharing services and disable content-appended buttons
  6. Disable all sharing services and verify that buttons no longer appear on posts

…aring

When a block-based theme is active, the sharing settings page replaced
the full services configuration with only a Site Editor prompt. This
made it impossible for users to disable legacy sharing buttons that
are appended to post content via the_content filter.

Fix: Always render services_config_display() below the block theme
message, so users retain full control over legacy sharing settings.

Fixes Automattic#49495
@github-actions github-actions Bot added [Feature] Sharing Post sharing, sharing buttons [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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 🤖



Jetpack plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@github-actions github-actions Bot added [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. OSS Citizen This Pull Request was opened by an Open Source contributor. labels Jul 7, 2026
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you create the changelog entry again? This is incorrect.

Error: Type must be "major", "enhancement", "compat", "bugfix", or "other".

I would recommend using the built-in CLI tool to generate those entries, to avoid such issues.

Suggested change
Type: fixed
Type: bugfix

@jeherve jeherve added [Status] Needs Review This PR is ready for review. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Sharing Post sharing, sharing buttons OSS Citizen This Pull Request was opened by an Open Source contributor. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] Needs Review This PR is ready for review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot disable sharing buttons from a block theme

2 participants