add_section('hero', array( 'title' => __('Section : Hero', 'medilab'), 'description' => sprintf(__('Options For Hero Section', 'medilab')), 'priority' => 130 )); // Setting and Control For Background Image $wp_customize -> add_setting('hero_background_image', array( 'default' => get_template_directory_uri().'/inc/images/hero-bg.jpg', 'type' => 'theme_mod' )); $wp_customize -> add_control(new WP_Customize_Image_Control($wp_customize, 'hero_background_image', array( 'label' => __('Hero Section : Background Image', 'medilab'), 'description' => 'Select Image For the first section background. The recommended image size is 1200x900.', 'section' => 'hero', 'settings' => 'hero_background_image', 'priority' => 1 ))); /************************************************************************* ************************************************************************** || || || First Heading || || || ************************************************************************** ************************************************************************** || || || This includes customizer settings for first heading || || it includes font family, letter spacing, line height, || || font color, font weight and text transform. || || || *************************************************************************** ***************************************************************************/ // Setting and Control For First Heading $wp_customize -> add_setting('hero_heading', array( 'default' => 'Welcome To Medilab', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control('hero_heading', array( 'label' => __('Heading', 'medilab'), 'section' => 'hero', 'priority' => 2 )); // Setting And Control For First Heading (Color Picker) $wp_customize->add_setting( 'hero_heading_color', array( 'default' => '#04bfbf', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'hero_heading_color', array( 'label' => 'Heading Color', 'section' => 'hero', 'settings' => 'hero_heading_color', 'priority' => 2 ))); // Setting And Control For First Heading (Font Weight) $wp_customize -> add_setting('hero_heading_font_weight', array( 'default' => '300', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control( new WP_Customize_Control ( $wp_customize, 'hero_heading_font_weight', array( 'label' => 'Select Font Weight', 'description' => 'Select Font Weight From The Dropdown Menu', 'settings' => 'hero_heading_font_weight', 'section' => 'hero', 'type' => 'select', 'priority' => 2, 'choices' => array( 'normal' => 'Default', 'bold' => 'Bold', 'bolder' => 'Bolder', '100' => '100', '200' => '200', '300' => '300', '400' => '400', '500' => '500', '600' => '600', '700' => '700', '800' => '800', '900' => '900' ) ))); // Setting And Control For First Heading (Text Transform) $wp_customize -> add_setting('hero_heading_transform', array( 'default' => 'capitalize', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control( new WP_Customize_Control ( $wp_customize, 'hero_heading_transform', array( 'label' => 'Select Text Transform', 'description' => 'Select Whether You want text to be lowercase , uppercase or capitalized', 'settings' => 'hero_heading_transform', 'section' => 'hero', 'type' => 'select', 'priority' => 2, 'choices' => array( 'uppercase' => 'Uppercase', 'lowercase' => 'Lowercase', 'capitalize' => 'Capitalize' ) ))); // Seeting and Control For First Heading (Font Size) $wp_customize -> add_setting('hero_heading_font_size', array( 'default' => '48px', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control('hero_heading_font_size', array( 'label' => __('Font Size', 'medilab'), 'description' => 'Enter Font Size In The Input Field Below. You can use the following units : px, em, rem, vh, %', 'section' => 'hero', 'priority' => 2 )); // Setting And Control For First Heading (Line Height) $wp_customize -> add_setting('hero_heading_line_height', array( 'default' => '12px', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control('hero_heading_line_height', array( 'label' => __('Line Height', 'medilab'), 'description' => 'Enter Line Height In The Input Field Below. You can use the following units : px, em, rem, vh, %', 'section' => 'hero', 'priority' => 2 )); // Setting And Control For First Heading (Letter Spacing) $wp_customize -> add_setting('hero_heading_letter_spacing', array( 'default' => '6px', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control('hero_heading_letter_spacing', array( 'label' => __('Letter Spacing', 'medilab'), 'description' => 'Enter Letter Spacing In The Input Field Below. You can use the following units : px, em, rem, vh, %', 'section' => 'hero', 'priority' => 2 )); // Setting And Control For First Heading (Font Family) $wp_customize -> add_setting('hero_heading_font_family', array( 'default' => 'Georgia', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control( new WP_Customize_Control ( $wp_customize, 'hero_heading_font_family', array( 'label' => 'Select Font Family', 'description' => 'Select The Font Family For The Heading', 'settings' => 'hero_heading_font_family', 'section' => 'hero', 'type' => 'select', 'priority' => 2, 'choices' => array( 'Andale Mono', 'Arial', 'Comic Sans MS', 'Courier' , 'Georgia', 'Lucida Sans Unicode' , 'Marlett' , 'Minion Web', 'Symbol' , 'Times New Roman' , 'Trebuchet MS', 'Verdana' ) ))); /************************************************************************* ************************************************************************** || Second Heading || || || || || ************************************************************************** ************************************************************************** || || || This includes customizer settings for first heading || || it includes font family, letter spacing, line height, || || font color, font weight and text transform. || || || ************************************************************************** **************************************************************************/ // Setting and Control For Second Heading $wp_customize -> add_setting('hero_sub_heading', array( 'default' => 'We are team of talented designers making websites with Bootstrap', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control('hero_sub_heading', array( 'label' => __('Subheading', 'medilab'), 'section' => 'hero', 'priority' => 7 )); // Setting And Control For Second Heading (Color Picker) $wp_customize->add_setting( 'hero_sub_heading_color', array( 'default' => '#333', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'hero_sub_heading_color', array( 'label' => 'Sub Heading Color', 'section' => 'hero', 'settings' => 'hero_sub_heading_color', 'priority' => 2 ))); // Setting And Control For Second Heading (Font Weight) $wp_customize -> add_setting('hero_sub_heading_font_weight', array( 'default' => '300', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control( new WP_Customize_Control ( $wp_customize, 'hero_sub_heading_font_weight', array( 'label' => 'Select Font Weight (Sub Heading)', 'description' => 'Select Font Weight From The Dropdown Menu', 'settings' => 'hero_sub_heading_font_weight', 'section' => 'hero', 'type' => 'select', 'priority' => 2, 'choices' => array( 'normal' => 'Default', 'bold' => 'Bold', 'bolder' => 'Bolder', '100' => '100', '200' => '200', '300' => '300', '400' => '400', '500' => '500', '600' => '600', '700' => '700', '800' => '800', '900' => '900' ) ))); // Setting And Control For Second Heading (Text Transform) $wp_customize -> add_setting('hero_sub_heading_transform', array( 'default' => 'capitalize', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control( new WP_Customize_Control ( $wp_customize, 'hero_sub_heading_transform', array( 'label' => 'Select Text Transform (Sub Heading)', 'description' => 'Select Whether You want text to be lowercase , uppercase or capitalized', 'settings' => 'hero_sub_heading_transform', 'section' => 'hero', 'type' => 'select', 'priority' => 2, 'choices' => array( 'uppercase' => 'Uppercase', 'lowercase' => 'Lowercase', 'capitalize' => 'Capitalize' ) ))); // Seeting and Control For Second Heading (Font Size) $wp_customize -> add_setting('hero_sub_heading_font_size', array( 'default' => '20px', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control('hero_sub_heading_font_size', array( 'label' => __('Font Size (Sub Heading)', 'medilab'), 'description' => 'Enter Font Size In The Input Field Below. You can use the following units : px, em, rem, vh, %', 'section' => 'hero', 'priority' => 2 )); // Setting And Control For Second Heading (Line Height) $wp_customize -> add_setting('hero_sub_heading_line_height', array( 'default' => '6px', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control('hero_sub_heading_line_height', array( 'label' => __('Line Height(Sub Heading)', 'medilab'), 'description' => 'Enter Line Height In The Input Field Below. You can use the following units : px, em, rem, vh, %', 'section' => 'hero', 'priority' => 2 )); // Setting And Control For Second Heading (Letter Spacing) $wp_customize -> add_setting('hero_sub_heading_letter_spacing', array( 'default' => '6px', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control('hero_sub_heading_letter_spacing', array( 'label' => __('Letter Spacing (Sub Heading)', 'medilab'), 'description' => 'Enter Letter Spacing In The Input Field Below. You can use the following units : px, em, rem, vh, %', 'section' => 'hero', 'priority' => 2 )); // Setting And Control For Second Heading (Font Family) $wp_customize -> add_setting('hero_sub_heading_font_family', array( 'default' => 'Georgia', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control( new WP_Customize_Control ( $wp_customize, 'hero_sub_heading_font_family', array( 'label' => 'Select Font Family (Sub Heading)', 'description' => 'Select The Font Family For The Heading', 'settings' => 'hero_sub_heading_font_family', 'section' => 'hero', 'type' => 'select', 'priority' => 2, 'choices' => array( 'Andale Mono', 'Arial', 'Comic Sans MS', 'Courier' , 'Georgia', 'Lucida Sans Unicode' , 'Marlett' , 'Minion Web', 'Symbol' , 'Times New Roman' , 'Trebuchet MS', 'Verdana' ) ))); /************************************************************************* ************************************************************************** || || || Button || || || ************************************************************************** ************************************************************************** || || || This includes customizer settings for first heading || || it includes font family, letter spacing, line height, || || font color, font weight and text transform. || || || *************************************************************************** ***************************************************************************/ // Setting and Control For Button (Anchor Link) $wp_customize -> add_setting('button', array( 'default' => 'Get Started', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control('button', array( 'label' => __('Button', 'medilab'), 'section' => 'hero', 'priority' => 2 )); // Setting and Control For Button (Padding) $wp_customize -> add_setting('button_padding', array( 'default' => ('12px 35px'), 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize -> add_control('button_padding', array( 'label' => __('Button Padding', 'medilab'), 'description' => 'Give your padding here. You can use the following units in padding : px, em, rem, vh and %. Use CSS padding here.', 'section' => 'hero', 'priority' => 2 )); // Setting and Control For Button Background $wp_customize->add_setting( 'button_background', array( 'default' => '#1977cc', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'button_background', array( 'label' => 'Button Background Color', 'section' => 'hero', 'settings' => 'button_background', 'priority' => 2 ))); // Setting and Color For Button Text Color $wp_customize->add_setting( 'button_text_color', array( 'default' => '#fff', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'button_text_color', array( 'label' => 'Button Text Color', 'section' => 'hero', 'settings' => 'button_text_color', 'priority' => 2 ))); // Setting and Color For Button Font Family (Input Field) $wp_customize->add_setting( 'button_font', array( 'default' => 'Raleway', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize->add_control( 'button_font', array( 'label' => 'Button Font Family', 'description' => 'Select the font family for your button. You can also use the Google Fonts if you want to', 'section' => 'hero', 'settings' => 'button_font', 'priority' => 2 )); // Settings and Control For Button Font Size $wp_customize->add_setting( 'button_font_size', array( 'default' => '14px', 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', )); $wp_customize->add_control( 'button_font_size', array( 'label' => 'Button Font Size', 'description' => 'Font Size For Button. Default is 14px', 'section' => 'hero', 'settings' => 'button_font_sizes', 'priority' => 2 )); } add_action('customize_register','customizer_implement');