Heading font set in Neve is replaced by the body font after switching to Eduacademy
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
Direzione di ricerca
Inizia in inc/Assets_Manager.php a get_css_font_vars() intorno alle righe 174-179, dove il font dei titoli di Neve viene letto e poi sovrascritto dal font del corpo prima che venga eseguito il controllo dei titoli. Leggi le ricerche delle opzioni circostanti per vedere come viene recuperato il valore memorizzato di neve_headings_font_family, poi rendi il font del corpo solo un fallback quando non esiste un font per i titoli. Fatto appare come wp eval 'echo Eduacademy\Assets_Manager::get_inherited_style_values();' che emette --neve-font-family-heading:Fraunces insieme al font del corpo Outfit per l'opzione seedata theme_mods_neve.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- PHP
- Stelle
- 0
- Fork
- 0
- Merge medio
- 22h 12m
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Codeinwp/eduacademy
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
Codeinwp/eduacademy#30 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Codeinwp/eduacademy#31 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Codeinwp/eduacademy#29 ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
Codeinwp/eduacademy#32 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Codeinwp/eduacademy#6 ·
Tutte le issue di Codeinwp/eduacademy
Issue simili
-
Change: check an identifier filter the same way in every tool - the order of somcp_search_ordersApertaconsistency enhancement Orders
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
novalo-dev/Prestashop-MCP-Server#343 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
claude
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
sprain/sprainocchio#45 ·
I maintainer di solito rispondono entro 1 giorno
-
sync-en
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
sync-en
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno