Skip to content

fix: hide font family option from newsletter#2099

Merged
laurelfulford merged 2 commits intotrunkfrom
fix/hide-font-option
May 6, 2026
Merged

fix: hide font family option from newsletter#2099
laurelfulford merged 2 commits intotrunkfrom
fix/hide-font-option

Conversation

@laurelfulford
Copy link
Copy Markdown
Contributor

@laurelfulford laurelfulford commented May 1, 2026

All Submissions:

Changes proposed in this Pull Request:

WordPress 7.0 introduces an Appearance > Fonts page. While this is somewhat redundant to the font options in the Newspack theme, it has a couple nice benefits:

  • It can be used to upload font files, which then preview in the editor. We previously did this by SFTPing fonts and using Custom CSS, which doesn't preview in the editor.
  • It adds an option to change the font face on a per-block basis, which can be nice.

There's some risks but on the whole it seems like a net positive... one issue is that the font family absolutely will not work in the Newsletter, so this PR removes it. It also renames an editor function to capture that it's now doing more than changing the layout width.

Closes NEWS-1625

How to test the changes in this Pull Request:

  1. On a site running the latest WordPress RC, navigate to Appearance > Fonts.
  2. Click Install Fonts, allow Google Fonts, pick at least one font and install a variant by checking at least one weight/style, and clicking 'Install':
CleanShot 2026-05-01 at 15 57 30
  1. Go to a regular post/page, and add a block like a paragraph or heading. When the block is selected, click the kebab (... menu next to the Typography header in the sidebar, and confirm one of the options you can add to the panel is 'Font':
CleanShot 2026-05-01 at 15 58 26
  1. Apply this PR.
  2. Repeat step 3 with a post/page and confirm you can still add a 'Font' option via the Typography panel to change the font face.
  3. Repeat step 3 with a newsletter post and confirm you CAN'T add a 'Font' option via the Typography panel -- it shouldn't show up as an option at all.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@laurelfulford laurelfulford requested a review from a team as a code owner May 1, 2026 23:00
@laurelfulford laurelfulford requested review from Copilot and removed request for a team May 1, 2026 23:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the newsletter (email) block editor settings to remove the block-level font family control, since fonts registered in WordPress (including via Appearance > Fonts in WP 7.0) can’t be reliably rendered in email clients.

Changes:

  • Clears __experimentalFeatures.typography.fontFamilies for newsletter/email editor contexts to hide the font family picker.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread includes/class-newspack-newsletters-editor.php
@laurelfulford laurelfulford requested a review from a team May 1, 2026 23:40
@chickenn00dle chickenn00dle self-requested a review May 6, 2026 18:22
@github-actions github-actions Bot added [Status] Approved Ready to merge and removed [Status] Needs Review labels May 6, 2026
@laurelfulford
Copy link
Copy Markdown
Contributor Author

Thanks!!

@laurelfulford laurelfulford merged commit 3a928a5 into trunk May 6, 2026
11 checks passed
@laurelfulford laurelfulford deleted the fix/hide-font-option branch May 6, 2026 23:03
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Hey @laurelfulford, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants