Skip to content

News block field group is titled "Modal Block" #122

Description

@Herm71

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

  • Field group title describes the News block
  • News_Block::NAME / get_key() unchanged
  • Existing News blocks still render with their saved field values intact
  • The stale note in the get_title() docblock referencing this issue is removed

Location: src/Blocks/News_Block.php — get_title()

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Tooling, packaging, docsbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions