Created
October 12, 2016 05:31
-
-
Save jessicahawkins3344/1ab3f3eccbfd999f6263a0efb94bf3a5 to your computer and use it in GitHub Desktop.
Customizer-Mods.php Sample for Customizer Library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Functions used to implement options | |
* | |
* @package Customizer Library Demo | |
*/ | |
/** | |
* Enqueue Google Fonts Example | |
*/ | |
function my_customizer_fonts() { | |
// Font options | |
$fonts = array( | |
get_theme_mod( 'primary-font', customizer_library_get_default( 'primary-font' ) ), | |
get_theme_mod( 'secondary-font', customizer_library_get_default( 'secondary-font' ) ) | |
); | |
$font_uri = customizer_library_get_google_font_uri( $fonts ); | |
// Load Google Fonts | |
wp_enqueue_style( 'squarely_fonts', $font_uri, array(), null, 'screen' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_customizer_fonts' ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment