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
{{ message }}
Repository navigation
Localize Text doesn't localize string attributes of non-core blocks #869
"Localize Text" only localizes attributes of core blocks. get_localizable_block_attributes() is a fixed list (Search, pagination links, Navigation Link, Read More, …):
User-facing string attributes of any block are wrapped in esc_attr__().
Suggested fix
Instead of a hardcoded list, localize string attributes whose block.json definition has "role": "content" (the same signal the editor uses for content-only editing), and keep the list as a fallback for core blocks that don't declare it.
Drafted with AI assistance, verified by me against a theme exported with Create Block Theme and the source.
Activity