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' => esc_html__( 'Hide Call to Action Section?','asycom' ), 'description' => esc_html__( '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' => esc_html__('WE MAKE THINGS BETTER!', 'asycom'), 'sanitize_callback' => 'wp_filter_nohtml_kses', 'transport' => 'postMessage' ) ); $wp_customize->add_control('asycom_cta_title', array( 'label' => esc_html__('Call to Action section Title', 'asycom'), 'section' => 'asycom_cta_options', 'type' => 'text', 'description' => esc_html__('Main Title of Call to Action 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', 'transport' => 'postMessage') ); $wp_customize->add_control('asycom_cta_sub_title', array( 'label' => esc_html__('Sub Title', 'asycom'), 'section' => 'asycom_cta_options', 'type' => 'text', 'description' => esc_html__('Sub Title of Call to action section', 'asycom') ) ); /* Call To action - Background */ $wp_customize->add_setting('asycom_cta_bg', array( 'default' => ASYCOM_IMAGES . '/bg-02.jpg', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'asycom_cta_bg', array( 'label' => esc_html__('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', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'asycom_cta_over_bg_color', array( 'label' => esc_html__('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', 'transport' => 'postMessage' )); $wp_customize->add_control('asycom_cta_btn_text', array( 'label' => esc_html__('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', 'transport' => 'postMessage' )); $wp_customize->add_control('asycom_cta_btn_url', array( 'label' => esc_html__('Call to Action Button Link(URL)', 'asycom'), 'section' => 'asycom_cta_options', 'type' => 'url' ) );