Two block patterns share the title "Hero with feature boxes"

Aperta Adatta ai principianti
#119 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
88/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
php, wordpress
Ambito
content

Direzione di ricerca

Il titolo duplicato è impostato in inc/patterns/front-page-hero.php alla riga 18 e in inc/patterns/hero-with-feature-boxes.php alla riga 38. Leggi entrambi i file, poi cambia il titolo in front-page-hero.php con una stringa distinta come "Front page hero". Fatto quando i due pattern mostrano nomi diversi in Fork Patterns; anche il file .pot dovrà essere rigenerato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What's wrong

In the block inserter, under Patterns → Fork Patterns, two different patterns are both called Hero with feature boxes, so users can't tell them apart by name.

Cause

Both files register the same title:

  • inc/patterns/front-page-hero.php, line 18: 'title' => __( 'Hero with feature boxes', 'fork' )
  • inc/patterns/hero-with-feature-boxes.php, line 38: 'title' => __( 'Hero with feature boxes', 'fork' )

front-page-hero is the hero the Front Page template uses ("Fork is a clean & minimal theme…", two buttons, an image). Its title looks copied from the other file.

Steps to reproduce
  1. Open https://playground.wordpress.net/?wp=latest&theme=fork&login=yes&url=/wp-admin/post-new.php?post_type=page
  2. Open the block inserter (+), then Patterns → Fork Patterns.
  3. Hover over the patterns, or search for "Hero with feature boxes".

Expected: each pattern has its own name.
Actual: two patterns are named "Hero with feature boxes".

Suggested fix

Give front-page-hero its own title, for example "Front page hero" (the string is translatable, so the .pot file needs regenerating).

Lingua principale
PHP
Stelle
0
Fork
0
Merge medio
1h 2m
PR unite (30g)
5

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Codeinwp/fork

Tutte le issue di Codeinwp/fork

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.