Found while writing docblocks for src/Blocks/ (#121).
Problem
The News block's ACF field group is titled "Modal Block":
protected function get_title(): string {
return esc_html__( 'Modal Block', 'ucsc' );
}
That string is what an editor sees as the field group heading in the block sidebar when they select a News block. There is no modal anywhere in this plugin — grep -ri modal over the repo returns this line and nothing else — so it reads as a copy-paste leftover rather than a deliberate name.
Introduced in 7bb59e0 ("Register News block (#30) (#32)"), the commit that first added the block, so it has been wrong since the block shipped.
For comparison, every other block titles its group after itself:
| block |
group title |
| Featured News |
Featured Stories |
| Magazine |
UCSC Magazine |
| Media Coverage |
Media Coverage |
| Photo of the Week |
UCSC Photo of the Week Block |
| Post Header |
Post Header |
| Press Inquiries |
Press Inquiries |
| Related Stories |
Related Stories |
| News |
Modal Block |
Why it wasn't fixed in #121
That PR is documentation-only and verified as such by token comparison. Changing this string is a user-visible content change and wanted its own decision.
Fix
Rename to something that describes the block — "News" or "News Block", matching the pattern above.
This is safe to change. The group title is cosmetic; the group key comes from get_key() → News_Block::NAME (news_query_block) and is untouched, so no saved field data is affected and no migration is needed.
Worth deciding the exact wording with whoever supports editors, since it appears in the editing UI.
Acceptance
Location: src/Blocks/News_Block.php — get_title()
Found while writing docblocks for
src/Blocks/(#121).Problem
The News block's ACF field group is titled "Modal Block":
That string is what an editor sees as the field group heading in the block sidebar when they select a News block. There is no modal anywhere in this plugin —
grep -ri modalover the repo returns this line and nothing else — so it reads as a copy-paste leftover rather than a deliberate name.Introduced in 7bb59e0 ("Register News block (#30) (#32)"), the commit that first added the block, so it has been wrong since the block shipped.
For comparison, every other block titles its group after itself:
Why it wasn't fixed in #121
That PR is documentation-only and verified as such by token comparison. Changing this string is a user-visible content change and wanted its own decision.
Fix
Rename to something that describes the block — "News" or "News Block", matching the pattern above.
This is safe to change. The group title is cosmetic; the group key comes from
get_key()→News_Block::NAME(news_query_block) and is untouched, so no saved field data is affected and no migration is needed.Worth deciding the exact wording with whoever supports editors, since it appears in the editing UI.
Acceptance
News_Block::NAME/get_key()unchangedget_title()docblock referencing this issue is removedLocation: src/Blocks/News_Block.php —
get_title()