Heading font set in Neve is replaced by the body font after switching to Eduacademy
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Bắt đầu trong inc/Assets_Manager.php tại get_css_font_vars() quanh các dòng 174-179, nơi font tiêu đề của Neve được đọc và sau đó bị font nội dung ghi đè trước khi kiểm tra tiêu đề chạy. Đọc các tra cứu tùy chọn xung quanh để xem giá trị đã lưu của neve_headings_font_family được lấy như thế nào, sau đó chỉ biến font nội dung thành fallback khi không tồn tại font tiêu đề. Hoàn thành trông giống như wp eval 'echo Eduacademy\Assets_Manager::get_inherited_style_values();' phát ra --neve-font-family-heading:Fraunces cùng với font nội dung Outfit cho tùy chọn đã seed theme_mods_neve.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
When a site switches from Neve to Eduacademy, Eduacademy is meant to keep Neve's fonts. The body font carries over, but the heading font doesn't: headings use the body font instead of the heading font chosen in Neve.
In inc/Assets_Manager.php, get_css_font_vars() reads Neve's heading font (line 174). Then, when a body font is set, it overwrites that value with the body font (line 179):
$neve_headings_font = $neve_body_font; // If the body font is set, the headings font should be the same until we check if the headings font is set.
The check that follows reads that overwritten variable, so the heading font Neve stored is never used. The comment describes the intent (body font as a fallback), but the code replaces the stored value rather than falling back to it.
Step-by-step reproduction instructions
- On a site with Neve active, go to Appearance → Customize → Typography. Set the body font to Outfit and the headings font to Fraunces (both are in Eduacademy's font list). Publish.
- Switch the theme to Eduacademy 1.0.1.
- Open any page and view the page source. Find the theme's inline style (
eduacademy-style-inline-css).
Expected: --neve-font-family-body:Outfit;--neve-font-family-heading:Fraunces, with headings rendered in Fraunces.
Actual: --neve-font-family-body:Outfit;--neve-font-family-heading:Outfit, with headings rendered in Outfit.
Without Neve installed, the same result comes from setting the option directly:
wp option update theme_mods_neve '{"neve_body_font_family":"Outfit","neve_headings_font_family":"Fraunces"}' --format=json
Screenshots, screen recording, code snippet or Help Scout ticket
Found while adding Eduacademy to the WordPress compatibility checks (Codeinwp/qa-compatibility#168). The output above was read on a seeded test site with wp eval 'echo Eduacademy\Assets_Manager::get_inherited_style_values();'. The same happens on every WordPress version tried (7.0.9, 7.1-RC1, 7.1.5), so it is not a WordPress compatibility problem.
Environment info
Eduacademy 1.0.1 (built from the v1.0.1 tag), WordPress 7.0.9 / 7.1-RC1 / 7.1.5, PHP 8.3, wp-env.
Is the issue you are reporting a regression
No
- Ngôn ngữ chính
- PHP
- Star
- 0
- Fork
- 0
- Merge trung bình
- 22 giờ 12 phút
- Pull request đã merge (30 ngày)
- 6
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Codeinwp/eduacademy
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
Codeinwp/eduacademy#30 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Codeinwp/eduacademy#31 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Codeinwp/eduacademy#29 ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
Codeinwp/eduacademy#32 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Codeinwp/eduacademy#6 ·
Tất cả issue của Codeinwp/eduacademy
Issue tương tự
-
Change: check an identifier filter the same way in every tool - the order of somcp_search_ordersĐang mởconsistency enhancement Orders
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
novalo-dev/Prestashop-MCP-Server#343 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
claude
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
sprain/sprainocchio#45 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày