add_setting( 'asycom_hide_cta_section', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_attr', ) ); $wp_customize->add_control( 'asycom_hide_cta_section', array( 'type' => 'checkbox', 'section' => 'asycom_cta_options', // Add a default or your own section 'label' => __( 'Hide Call to Action Section?','asycom' ), 'description' => __( 'The Call to Action section will disappear if you enable this option' ,'asycom') ) ); /* About Us - Main title */ $wp_customize->add_setting('asycom_cta_title', array( 'default' => __('WE MAKE THINGS BETTER!', 'asycom'), 'sanitize_callback' => 'wp_filter_nohtml_kses' ) ); $wp_customize->add_control('asycom_cta_title', array( 'label' => __('Call to Action section Title', 'asycom'), 'section' => 'asycom_cta_options', 'type' => 'text', 'description' => __('Main Title of About Us section', 'asycom') ) ); /* About Us - sub title */ $wp_customize->add_setting('asycom_cta_sub_title', array( 'default' => "It's the best of themes in the world you have ever see", 'sanitize_callback' => 'wp_filter_nohtml_kses') ); $wp_customize->add_control('asycom_cta_sub_title', array( 'label' => __('Sub Title', 'asycom'), 'section' => 'asycom_cta_options', 'type' => 'text', 'description' => __('Sub Title of Call to action section', 'asycom') ) ); /* Call To action - Background */ $wp_customize->add_setting('asycom_cta_bg', array('default' => IMAGES . '/bg-02.jpg', 'sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'asycom_cta_bg', array( 'label' => __('Upload a backgound', 'asycom'), 'section' => 'asycom_cta_options', 'settings' => 'asycom_cta_bg' ) ) ); /* Call to Action - Background Color overlay */ $wp_customize->add_setting('asycom_cta_over_bg_color', array('default' => 'rgb(36, 3, 67)', 'sanitize_callback' => 'sanitize_hex_color')); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'asycom_cta_over_bg_color', array( 'label' => __('About Us Backgound color overlay', 'asycom'), 'section' => 'asycom_cta_options', 'settings' => 'asycom_cta_over_bg_color', )) ); /* About Us - desc */ $wp_customize->add_setting('asycom_cta_btn_text', array('default' => 'Learn More', 'sanitize_callback' => 'wp_filter_nohtml_kses')); $wp_customize->add_control('asycom_cta_btn_text', array( 'label' => __('Call to Action Button Text', 'asycom'), 'section' => 'asycom_cta_options', 'type' => 'textarea' ) ); /* Call to action - Button URL */ $wp_customize->add_setting('asycom_cta_btn_url', array( 'default' => '#', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('asycom_cta_btn_url', array( 'label' => __('Call to Action Button Link(URL)', 'asycom'), 'section' => 'asycom_cta_options', 'type' => 'url' ) );