Skip to content

Instantly share code, notes, and snippets.

@edpittol
Last active November 22, 2016 22:22
Show Gist options
  • Save edpittol/4abe95882b8c89f59839afcb409788c9 to your computer and use it in GitHub Desktop.
Save edpittol/4abe95882b8c89f59839afcb409788c9 to your computer and use it in GitHub Desktop.
/**
* Add Flower font to the theme options font list.
*
* @param array $custom_fonts Current custom fonts.
* @return string[string][string] The Web fonts section.
*/
function mytheme_redux_custom_fonts( $custom_fonts ) {
return array(
'Web Fonts' => array(
‘flower' => 'flower'
)
);
}
add_filter( 'redux/option_name/field/typography/custom_fonts', 'mytheme_redux_custom_fonts' );
/**
* Add Flower font stylesheet.
*/
function mytheme_enqueue_scripts() {
wp_enqueue_style(
'flower-font',
get_stylesheet_directory_uri() . ‘/assets/fonts/flower/stylesheet.css'
);
}
add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_scripts' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment