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

Đang mở Phù hợp với người mới
#119 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
88/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php, wordpress
Lĩnh vực
content

Hướng nghiên cứu

Tiêu đề trùng lặp được đặt trong inc/patterns/front-page-hero.php ở dòng 18 và trong inc/patterns/hero-with-feature-boxes.php ở dòng 38. Hãy đọc cả hai tệp, sau đó đổi tiêu đề trong front-page-hero.php thành một chuỗi khác biệt như "Front page hero". Hoàn tất khi hai pattern hiển thị các tên khác nhau trong Fork Patterns; tệp .pot cũng sẽ cần được tạo lại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).

Ngôn ngữ chính
PHP
Star
0
Fork
0
Merge trung bình
1 giờ 2 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Codeinwp/fork

Tất cả issue của Codeinwp/fork

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.