'; echo sanitize_text_field( $theme_options['css'] ); echo ''; } } add_action( 'wp_head', 'blogy_css' ); /** * blogy Google Font Integration */ function blogy_include_font() { $theme_options = get_option( 'blogy_options' ); if ( ( isset ( $theme_options['font'] ) && '' != $theme_options['font'] ) || ( isset ( $theme_options['font_alt'] ) && '' != $theme_options['font_alt'] ) ) { list( $font_parameter, $font_name ) = explode( ',', $theme_options['font'] ); list( $font_alt_parameter, $font_alt_name ) = explode( ',', $theme_options['font_alt'] ); if ( 'None' != $font_name || 'None' != $font_alt_name ) { if ( isset ( $font_alt_name ) && '' != $font_alt_name && 'None' != $font_alt_name && isset ( $font_name ) && '' != $font_name && 'None' != $font_name ) { $sep = '|'; } else { $sep = ''; } if( $font_parameter == 'None' ) { $font_parameter = ''; $font_name = ''; } if( $font_alt_parameter == 'None' ) { $font_alt_parameter = ''; $font_alt_name = ''; } echo '',"\n"; echo '',"\n"; } } } add_action( 'wp_head', 'blogy_include_font' ); /** * blogy alternative styles */ function blogy_alt_styles() { $theme_options = get_option( 'blogy_options' ); if( isset ( $theme_options['color'] ) && '' != $theme_options['color']) { wp_enqueue_style( 'alt-style', get_template_directory_uri() . '/css/' . $theme_options['color'] . '.css', array( 'style' ) ); } } add_action( 'wp_enqueue_scripts', 'blogy_alt_styles' );