浏览代码

Exford: Enqueue Source Serif Pro

Thomas Guillot 6 年之前
父节点
当前提交
c8f8e04f87
共有 2 个文件被更改,包括 5 次插入29 次删除
  1. 5 3
      exford/functions.php
  2. 0 26
      exford/sass/_config-child-theme.scss

+ 5 - 3
exford/functions.php

@@ -121,7 +121,7 @@ function exford_fonts_url() {
 	$fonts_url = '';
 
 	/* Translators: If there are characters in your language that are not
-	* supported by Source Sans, translate this to 'off'. Do not translate
+	* supported by Source Serif Pro, translate this to 'off'. Do not translate
 	* into your own language.
 	*/
 	$source_serif_pro = esc_html_x( 'on', 'Source Serif Pro font: on or off', 'exford' );
@@ -129,7 +129,9 @@ function exford_fonts_url() {
 	if ( 'off' !== $source_serif_pro ) {
 		$font_families = array();
 
-		$font_families[] = 'Source+Sans+Pro:400,400i,700,700i';
+		if ( 'off' !== $source_serif_pro ) {
+			$font_families[] = 'Source Serif Pro:400,700,400i,700i';
+		}
 
 		$query_args = array(
 			'family' => urlencode( implode( '|', $font_families ) ),
@@ -148,7 +150,7 @@ function exford_fonts_url() {
 function exford_scripts() {
 
 	// enqueue Google fonts, if necessary
-	 wp_enqueue_style( 'exford-fonts', exford_fonts_url(), array(), null );
+	wp_enqueue_style( 'exford-fonts', exford_fonts_url(), array(), null );
 
 	// dequeue parent styles
 	wp_dequeue_style( 'varia-style' );

+ 0 - 26
exford/sass/_config-child-theme.scss

@@ -1,26 +0,0 @@
-/**
- * Filter Sass map values for child theme output.
- * - See: style-child-theme.scss
- */
-
-// @import url('https://fonts.googleapis.com/css?family=Playfair+Display:400,400i|Roboto:400,400i,700&display=swap');
-
-$config-global: map-deep-set($config-global, "font" "size" "root", "20px");
-$config-global: map-deep-set($config-global, "font" "family" "primary", "\'Playfair Display\', serif");
-$config-global: map-deep-set($config-global, "font" "family" "secondary", "\'Roboto\', sans-serif");
-$config-global: map-deep-set($config-global, "color" "primary" "default", pink);
-$config-global: map-deep-set($config-global, "font" "size" "root", "20px");
-
-// Button
-$config-button: map-deep-set($config-button, "color" "background", orange);
-
-// Headings
-$config-heading: map-deep-set($config-heading, "font" "family", "\'Playfair Display\', serif");
-$config-heading: map-deep-set($config-heading, "font" "weight", 200);
-
-// Header
-$config-header: map-deep-set($config-header, "branding" "title" "font" "family", "\'Playfair Display\', serif");
-$config-header: map-deep-set($config-header, "branding" "title" "font" "weight", 200);
-$config-header: map-deep-set($config-header, "branding" "description" "font" "family", "\'Roboto\', sans-serif");
-$config-header: map-deep-set($config-header, "branding" "color" "link", orange);
-$config-header: map-deep-set($config-header, "main-nav" "color" "link", orange);