Neve heading typography (H1–H6 weight, size, line height) never carries over to Eduacademy
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
Línea de trabajo
Lee primero inc/Neve_Mods.php: AVAILABLE_TYPEFACE_CONTROLS (línea 34), la comprobación con in_array() (línea 178) y la clave construida en la línea 181. Después corrige el llamador en inc/Assets_Manager.php alrededor de la línea 190 para que pase 'h1'…'h6' sin el guion bajo final, y corrige la clave de configuración a neve_h1_typeface_general para que coincida con MODS_TYPEFACE_H1 de Neve. Verifícalo con las llamadas a wp eval del issue, que deberían dejar de devolver un array vacío, y comprobando que el bloque :root en línea imprime --neve-font-weight-h1. Amplía tests/test-assets-manager.php para que se compruebe un valor de encabezado, no solo un peso de cuerpo.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
When a site switches from Neve to Eduacademy, Neve's heading typography (H1–H6 weight, size and line height) never carries over. Only the body typography does. Eduacademy's theme.json reads --neve-font-weight-h1, --neve-font-size-h2 and so on, but the theme never prints those variables, so headings always use Eduacademy's defaults.
There are two separate mistakes, and both would need fixing:
inc/Assets_Manager.phpline 190 builds the section name with a trailing underscore ('h1_'…'h6_') and passes it toNeve_Mods::get_neve_typeface_general(). That method only accepts names fromAVAILABLE_TYPEFACE_CONTROLS('','h1'…'h6',inc/Neve_Mods.phpline 34), soin_array()(line 178) refuses every heading and returns an empty array.- Even when called with
'h1', the method reads'neve_' . $type_setting_name . 'typeface_general'(line 181), which isneve_h1typeface_general. Neve stores the setting asneve_h1_typeface_general(MODS_TYPEFACE_H1in Neve'sinc/core/settings/config.php), so it would still find nothing.
The body works only because its section name is the empty string: that gives neve_typeface_general, which is Neve's real key.
Step-by-step reproduction instructions
- On a site with Neve active, go to Appearance → Customize → Typography → Headings → H1. Set the weight to 800 and the size to 44px. 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: the inline :root{…} block contains --neve-font-weight-h1:800, --neve-font-size-h1:44px and the heading variables, and an H1 renders at weight 800 and 44px.
Actual: no --neve-font-*-h1 (or any H2–H6) variable is printed, and the H1 keeps Eduacademy's default weight (600) and size.
Without Neve installed, the same result comes from setting the option directly:
wp option update theme_mods_neve '{"neve_h1_typeface_general":{"fontWeight":"800","fontSize":{"desktop":44,"suffix":{"desktop":"px"}}}}' --format=json
wp eval 'var_export( Eduacademy\Neve_Mods::get_instance()->get_neve_typeface_general( "h1_" ) );' # array ( )
wp eval 'var_export( Eduacademy\Neve_Mods::get_instance()->get_neve_typeface_general( "h1" ) );' # array ( )
Screenshots, screen recording, code snippet or Help Scout ticket
Found while adding Eduacademy to the WordPress compatibility checks (Codeinwp/qa-compatibility#168). The new test in tests/test-assets-manager.php (#26) covers a body font weight, which is the one typography value that does carry over, so it passes. The same happens on every WordPress version tried (7.0.9, 7.1-RC1, 7.1.5).
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
- Lenguaje dominante
- PHP
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 22 h 12 min
- PR fusionados (30 d)
- 6
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Codeinwp/eduacademy
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Codeinwp/eduacademy#30 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Codeinwp/eduacademy#31 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Codeinwp/eduacademy#28 ·
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
Codeinwp/eduacademy#32 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Codeinwp/eduacademy#6 ·
Todos los issues de Codeinwp/eduacademy
Issues similares
-
Change: check an identifier filter the same way in every tool - the order of somcp_search_ordersAbiertoconsistency enhancement Orders
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
novalo-dev/Prestashop-MCP-Server#343 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
claude
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
sprain/sprainocchio#45 ·
Los mantenedores suelen responder en 1 día
-
sync-en
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
sync-en
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día