Skip to content

Commit

Permalink
loading Google Fonts in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
BenSibley committed Nov 19, 2018
1 parent d7d4255 commit 0c9df97
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion inc/scripts.php
Expand Up @@ -4,7 +4,7 @@
function ct_founder_load_scripts_styles() {

$font_args = array(
'family' => urlencode( 'Noto Sans:400,700,400italic' ),
'family' => urlencode( 'Noto Sans:400,700,400i' ),
'subset' => urlencode( 'latin,latin-ext' )
);
$fonts_url = add_query_arg( $font_args, '//fonts.googleapis.com/css' );
Expand Down Expand Up @@ -50,6 +50,16 @@ function ct_founder_enqueue_admin_styles( $hook ) {
if ( $hook == 'appearance_page_founder-options' ) {
wp_enqueue_style( 'ct-founder-admin-styles', get_template_directory_uri() . '/styles/admin.min.css' );
}
if ( $hook == 'post.php' || $hook == 'post-new.php' ) {

$font_args = array(
'family' => urlencode( 'Noto Sans:400,700,400i' ),
'subset' => urlencode( 'latin,latin-ext' )
);
$fonts_url = add_query_arg( $font_args, '//fonts.googleapis.com/css' );

wp_enqueue_style( 'ct-founder-google-fonts', $fonts_url );
}
}
add_action( 'admin_enqueue_scripts', 'ct_founder_enqueue_admin_styles' );

Expand Down

0 comments on commit 0c9df97

Please sign in to comment.