add_section( 'homepage_cta_Section', array( 'title' => esc_html__( 'CTA Section Settings', 'always' ), 'capability' => 'edit_theme_options', 'panel' => 'homepage_option_panel', ) ); $wp_customize->add_setting('ed_cta_section', array( 'default' => $always_default['ed_cta_section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'always_sanitize_checkbox', ) ); $wp_customize->add_control('ed_cta_section', array( 'label' => esc_html__('Enable CTA Section', 'always'), 'section' => 'homepage_cta_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'select_page_for_cta', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'always_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'select_page_for_cta', array( 'label' => __( 'Select Call To Action Page', 'always' ) , 'section' => 'homepage_cta_Section', 'type' => 'dropdown-pages', 'allow_addition' => true, ) ); $wp_customize->add_setting('ed_cta_image_overlay', array( 'default' => $always_default['ed_cta_image_overlay'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'always_sanitize_checkbox', ) ); $wp_customize->add_control('ed_cta_image_overlay', array( 'label' => esc_html__('Enable Section Overlay', 'always'), 'section' => 'homepage_cta_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('ed_cta_post_excerpt', array( 'default' => $always_default['ed_cta_post_excerpt'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'always_sanitize_checkbox', ) ); $wp_customize->add_control('ed_cta_post_excerpt', array( 'label' => esc_html__('Enable CTA Excerpt Content', 'always'), 'section' => 'homepage_cta_Section', 'type' => 'checkbox', ) ); /*Button Text*/ $wp_customize->add_setting('homepage_cta_button_text', array( 'default' => $always_default['homepage_cta_button_text'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('homepage_cta_button_text', array( 'label' => esc_html__('Related Post Button Text', 'always'), 'description' => esc_html__('Removing text will disable read more on the related post', 'always'), 'section' => 'homepage_cta_Section', 'type' => 'text', ) ); $wp_customize->add_setting('homepage_cta_button_text_url', array( 'default' => $always_default['homepage_cta_button_text_url'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control('homepage_cta_button_text_url', array( 'label' => esc_html__('Related Post Button URL', 'always'), 'section' => 'homepage_cta_Section', 'type' => 'text', ) ); $wp_customize->add_setting('cta_link_tab', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'always_sanitize_checkbox', ) ); $wp_customize->add_control('cta_link_tab', array( 'label' => esc_html__('Open Link In New Tab', 'always'), 'section' => 'homepage_cta_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'always_cta_text_color', array( 'default' => $always_default['always_cta_text_color'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control(new WP_Customize_Color_Control( $wp_customize, 'always_cta_text_color', array( 'label' => esc_html__( 'Section Text Color', 'always' ), 'section' => 'homepage_cta_Section', 'settings' => 'always_cta_text_color', ) ) );