Skip to content

Conversation

@rajanarahul93
Copy link

What?

Closes #55057

This pull request updates the UI label for the setting that links a Post Featured Image. The dynamic label "Link to [Post Type]" is replaced with the static label "Make image a link".

Why?

The previous label was dynamically generated using the post type's singular_name (e.g., "Page," "Post"), which is typically capitalized. This created an inconsistent, title-cased label in the UI.

Previous attempts to programmatically lowercase this string were rejected because this approach is not safe for internationalization (i18n) and can break translations in other languages. This PR implements a pragmatic solution that was suggested by a project contributor in the issue thread.

How?

The dynamic sprintf logic for the label has been removed from packages/block-library/src/post-featured-image/edit.js. It is replaced with the static, translatable string __( 'Make image a link' ) for both the ToolsPanelItem and the nested ToggleControl.

This approach was confirmed to be a preferred solution in this comment.

Testing Instructions

  1. In the WordPress editor, add a Post Featured Image block.
  2. Assign an image to the block.
  3. With the block selected, open the settings sidebar on the right.
  4. Expand the "Settings" panel.
  5. Observe the toggle control's label. It should now read "Make image a link".

@github-actions
Copy link

github-actions bot commented Sep 27, 2025

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core, Gutenberg Plugin, New Block.
  • Labels found: Internationalization (i18n), First-time Contributor, [Block] Post Featured Image.

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @Alkasingh09.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: Alkasingh09.

Co-authored-by: rajanarahul93 <[email protected]>
Co-authored-by: properlypurple <[email protected]>
Co-authored-by: colinduwe <[email protected]>
Co-authored-by: benoitchantre <[email protected]>
Co-authored-by: johnbillion <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: richtabor <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Sep 27, 2025
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @rajanarahul93! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@t-hamano t-hamano added Internationalization (i18n) Issues or PRs related to internationalization efforts [Block] Post Featured Image Affects the Post Featured Image Block labels Sep 29, 2025
@rajanarahul93
Copy link
Author

I have rebased this branch to keep it in sync with the latest trunk. Standing by for review or any further feedback!

@github-actions github-actions bot added the [Package] Block library /packages/block-library label Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Post Featured Image Affects the Post Featured Image Block First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository Internationalization (i18n) Issues or PRs related to internationalization efforts [Package] Block library /packages/block-library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use lowercase capitalization on Featured Image "Link to..." control

2 participants