Skip to content

Instantly share code, notes, and snippets.

@studiopress
Created August 30, 2017 19:30
Show Gist options
  • Save studiopress/57024e76f2bd9687ef7fd4f75e63df5d to your computer and use it in GitHub Desktop.
Save studiopress/57024e76f2bd9687ef7fd4f75e63df5d to your computer and use it in GitHub Desktop.
Function that includes code removal for Google Fonts.
<?php
// Do NOT include the opening php tag.
// Enqueue scripts and styles.
add_action( 'wp_enqueue_scripts', 'monochrome_enqueue_scripts_styles' );
function monochrome_enqueue_scripts_styles() {
wp_enqueue_style( 'monochrome-fonts', '//fonts.googleapis.com/css?family=Muli:200,300,300i,400,400i,600,600i|Open+Sans+Condensed:300', array(), CHILD_THEME_VERSION );
wp_enqueue_style( 'monochrome-ionicons', '//code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css', array(), CHILD_THEME_VERSION );
wp_enqueue_script( 'monochrome-global-script', get_stylesheet_directory_uri() . '/js/global.js', array( 'jquery' ), '1.0.0', true );
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
wp_enqueue_script( 'monochrome-responsive-menu', get_stylesheet_directory_uri() . '/js/responsive-menus' . $suffix . '.js', array( 'jquery' ), CHILD_THEME_VERSION, true );
wp_localize_script( 'monochrome-responsive-menu', 'genesis_responsive_menu', monochrome_responsive_menu_settings() );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment