Skip to content

Commit

Permalink
fixes undefined indexes for fonts in functions.php file
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsequence committed Jan 12, 2015
1 parent 0e46eb3 commit 609ef0c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ function ap_core_load_scripts() {
wp_register_style( 'notoserif','http://fonts.googleapis.com/css?family=Noto+Serif&subset=' . $font_subset,false, $theme['Version'] );
wp_register_style( 'opensans', 'http://fonts.googleapis.com/css?family=Open+Sans&subset=' . $font_subset, false, $theme['Version'] );
// only enqueue fonts that are actually being used
$corefonts = array( $options['heading'], $options['body'], $options['alt'] );
$heading = ( isset( $options['heading'] ) ) ? $options['heading'] : $defaults['heading'];
$body = ( isset( $options['body'] ) ) ? $options['body'] : $defaults['body'];
$alt = ( isset( $options['alt'] ) ) ? $options['alt'] : $defaults['alt'];
$corefonts = array( $heading, $body, $alt );
// if any of these fonts are selected, load their stylesheets
if ( in_array( 'Droid Sans', $corefonts ) ) {
wp_enqueue_style( 'droidsans' );
Expand Down

0 comments on commit 609ef0c

Please sign in to comment.