Adds Hero typography customizer settings

This commit is contained in:
Tiago Noronha 2018-04-03 14:57:50 +01:00
parent c93fbb64a9
commit 3f01e9ddcf

View file

@ -46,6 +46,8 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
'storefront_heading_color' => '#333333',
'storefront_text_color' => '#6d6d6d',
'storefront_accent_color' => '#96588a',
'storefront_hero_heading_color' => '#000000',
'storefront_hero_text_color' => '#000000',
'storefront_header_background_color' => '#ffffff',
'storefront_header_text_color' => '#404040',
'storefront_header_link_color' => '#333333',
@ -228,6 +230,36 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
'priority' => 40,
) ) );
/**
* Hero Heading Color
*/
$wp_customize->add_setting( 'storefront_hero_heading_color', array(
'default' => apply_filters( 'storefront_default_hero_heading_color', '#000000' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_hero_heading_color', array(
'label' => __( 'Hero heading color', 'storefront' ),
'section' => 'storefront_typography',
'settings' => 'storefront_hero_heading_color',
'priority' => 50,
) ) );
/**
* Hero Text Color
*/
$wp_customize->add_setting( 'storefront_hero_text_color', array(
'default' => apply_filters( 'storefront_default_hero_text_color', '#000000' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_hero_text_color', array(
'label' => __( 'Hero text color', 'storefront' ),
'section' => 'storefront_typography',
'settings' => 'storefront_hero_text_color',
'priority' => 60,
) ) );
$wp_customize->add_control( new Arbitrary_Storefront_Control( $wp_customize, 'storefront_header_image_heading', array(
'section' => 'header_image',
'type' => 'heading',
@ -474,6 +506,8 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
$storefront_theme_mods = array(
'background_color' => storefront_get_content_background_color(),
'accent_color' => get_theme_mod( 'storefront_accent_color' ),
'hero_heading_color' => get_theme_mod( 'storefront_hero_heading_color' ),
'hero_text_color' => get_theme_mod( 'storefront_hero_text_color' ),
'header_background_color' => get_theme_mod( 'storefront_header_background_color' ),
'header_link_color' => get_theme_mod( 'storefront_header_link_color' ),
'header_text_color' => get_theme_mod( 'storefront_header_text_color' ),
@ -659,6 +693,14 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
color: ' . $storefront_theme_mods['footer_heading_color'] . ';
}
.page-template-template-homepage.has-post-thumbnail .type-page.has-post-thumbnail .entry-title {
color: ' . $storefront_theme_mods['hero_heading_color'] . ';
}
.page-template-template-homepage.has-post-thumbnail .type-page.has-post-thumbnail .entry-content {
color: ' . $storefront_theme_mods['hero_text_color'] . ';
}
#order_review {
background-color: ' . $storefront_theme_mods['background_color'] . ';
}