Skip to content

Instantly share code, notes, and snippets.

@jessicahawkins3344
Created October 12, 2016 05:31
Show Gist options
  • Save jessicahawkins3344/1ab3f3eccbfd999f6263a0efb94bf3a5 to your computer and use it in GitHub Desktop.
Save jessicahawkins3344/1ab3f3eccbfd999f6263a0efb94bf3a5 to your computer and use it in GitHub Desktop.
Customizer-Mods.php Sample for Customizer Library
<?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