You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the getVisualTypeName() function, the results are usually going to be the slugs for the post types, rather than all nice human readable labels from the Post Type Objects.
What is your proposed solution?
Is there a way for the getVisualTypeName() to extract and return the single label from the Post Type Object? Does it come along in the suggestion?
Activity
t-hamano commentedon Sep 4, 2025
Thanks for the suggestion.
I think the
getVisualTypeName()function itself should be completely refactored. Each strings are hardcoded, so it can't be localized.The
text-transform: capitalizeshould be removed as well:gutenberg/packages/block-editor/src/components/link-control/style.scss
Lines 145 to 149 in 8899bb5
Adi-ty commentedon Sep 4, 2025
Custom post types would need a separate core WordPress ticket to add
type_labelto the/wp/v2/searchREST API response.Localize labels in getVisualTypeName() for link control search items
Localize labels in getVisualTypeName() for link control search items (#…
Localize labels in getVisualTypeName() for link control search items (#…
Localize labels in getVisualTypeName() for link control search items (W…