function sky_typography_body() {
if ( 'roboto' == get_theme_mod( 'sky_typography_font_family', 'roboto' ) ) {
wp_register_style( 'google-fonts', '//fonts.googleapis.com/css?family=Roboto:300,400,500,700,900&display=swap&subset=cyrillic-ext,greek-ext' );
$classes[] = 'Roboto';
} else if ( 'open-sans' == get_theme_mod( 'sky_typography_font_family', 'roboto' ) ) {
wp_register_style( 'google-fonts', '//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800&display=swap&subset=cyrillic-ext,greek-ext' );
$classes[] = 'Open Sans';
}
wp_enqueue_style( 'google-fonts' );
// Turn classes array into space seperated string
$classes = implode( ' ', $classes );
// Return classes
return esc_attr( $classes );
}
$wp_customize->add_setting( 'background_color', array(
'default' => '#fff',
'transport' => 'postMessage',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'background_color', array(
'label' => esc_html__('Background Color', 'sky'),
'section' => 'sky_general_settings_styling',
'settings' => 'background_color',
'priority' => 10,
) ) );
$this->add_section(
'background_image',
array(
'title' => __( 'Background Image' ),
'theme_supports' => 'custom-background',
'priority' => 80,
)
);
$this->add_setting(
'background_image',
array(
'default' => get_theme_support( 'custom-background', 'default-image' ),
'theme_supports' => 'custom-background',
'sanitize_callback' => array( $this, '_sanitize_background_setting' ),
)
);
$this->add_setting(
new WP_Customize_Background_Image_Setting(
$this,
'background_image_thumb',
array(
'theme_supports' => 'custom-background',
'sanitize_callback' => array( $this, '_sanitize_background_setting' ),
)
)
);
$this->add_control( new WP_Customize_Background_Image_Control( $this ) );