Reflect font selection on settings page
This commit is contained in:
parent
21fed199cb
commit
c5964805d5
@ -10,7 +10,7 @@
|
||||
"styles": ["normal", "italic"],
|
||||
"weights": [100, 200, 300, 400, 500, 700, 900],
|
||||
"charsets": ["latin"],
|
||||
"formats": [],
|
||||
"formats": ["ttf"],
|
||||
"about": "Helvetica, also known by its original name Neue Haas Grotesk, is a widely used sans-serif typeface developed in 1957 by Swiss typeface designer Max Miedinger and Eduard Hoffmann. Helvetica Neue is a reworking of the typeface with a more structurally unified set of heights and widths. Other changes include improved legibility, heavier punctuation marks, and increased spacing in the numbers.",
|
||||
"note": "This is a font provided by the operating system and not always available.",
|
||||
"sources": {
|
||||
|
@ -12,9 +12,9 @@
|
||||
|
||||
// Setup
|
||||
$fonts = fictioneer_get_font_data();
|
||||
// $primary_font = get_theme_mod( 'primary_font_family_value', 'Open Sans' );
|
||||
// $secondary_font = get_theme_mod( 'secondary_font_family_value', 'Lato' );
|
||||
// $heading_font = get_theme_mod( 'heading_font_family_value', 'Open Sans' );
|
||||
$primary_font = get_theme_mod( 'primary_font_family_value', 'Open Sans' );
|
||||
$secondary_font = get_theme_mod( 'secondary_font_family_value', 'Lato' );
|
||||
$heading_font = get_theme_mod( 'heading_font_family_value', 'Open Sans' );
|
||||
|
||||
?>
|
||||
|
||||
@ -67,6 +67,18 @@ $fonts = fictioneer_get_font_data();
|
||||
if ( ! empty( $version ) ) {
|
||||
printf( _x( ' (v%s)', 'Settings font card.', 'fictioneer' ), $version );
|
||||
}
|
||||
|
||||
if ( $primary_font === $font['family'] ) {
|
||||
_ex( ' — Primary Font', 'Settings font card.', 'fictioneer' );
|
||||
}
|
||||
|
||||
if ( $secondary_font === $font['family'] ) {
|
||||
_ex( ' — Secondary Font', 'Settings font card.', 'fictioneer' );
|
||||
}
|
||||
|
||||
if ( $heading_font === $font['family'] ) {
|
||||
_ex( ' — Heading Font', 'Settings font card.', 'fictioneer' );
|
||||
}
|
||||
?></h3>
|
||||
|
||||
<div class="fictioneer-card__content">
|
||||
|
Loading…
x
Reference in New Issue
Block a user