add_section( 'main_header_setting', array( 'title' => esc_html__( 'Main Advertisement Settings', 'allinone' ), 'priority' => 10, 'capability' => 'edit_theme_options', 'panel' => 'theme_option_panel', ) ); $wp_customize->add_setting('ed_header_ad', array( 'default' => $allinone_default['ed_header_ad'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'allinone_sanitize_checkbox', ) ); $wp_customize->add_control('ed_header_ad', array( 'label' => esc_html__('Enable Top Advertisement Area', 'allinone'), 'section' => 'main_header_setting', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'ed_header_type', array( 'default' => $allinone_default['ed_header_type'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'allinone_sanitize_select' ) ); $wp_customize->add_control('ed_header_type', array( 'type' => 'select', 'section' => 'main_header_setting', 'label' => esc_html__( 'Addvertisement Section Container', 'allinone' ), 'choices' => array( 'twp-img-full-width-header' => esc_html__( 'Full Page', 'allinone' ), 'twp-img-boxed-header' => esc_html__( 'Default', 'allinone' ), 'twp-img-content-header' => esc_html__( 'Contained', 'allinone' ), ), 'active_callback' => 'allinone_header_ad_ac', ) ); $wp_customize->add_setting( 'addvertisement_section_title', array( 'default' => $allinone_default['addvertisement_section_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'addvertisement_section_title', array( 'label' => esc_html__( 'Addvertisement Section Title', 'allinone' ), 'section' => 'main_header_setting', 'type' => 'text', 'active_callback' => 'allinone_header_ad_ac', ) ); $wp_customize->add_setting('header_ad_image', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'header_ad_image', array( 'label' => esc_html__( 'Top Header AD Image', 'allinone' ), 'section' => 'main_header_setting', 'active_callback' => 'allinone_header_ad_ac', ) ) ); $wp_customize->add_setting('ed_header_link', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control('ed_header_link', array( 'label' => esc_html__('AD Image Link', 'allinone'), 'section' => 'main_header_setting', 'type' => 'text', 'active_callback' => 'allinone_header_ad_ac', ) ); // Archive Layout. $wp_customize->add_setting( 'allinone_header_bg_size', array( 'default' => $allinone_default['allinone_header_bg_size'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' ) ); $wp_customize->add_control('allinone_header_bg_size', array( 'type' => 'select', 'section' => 'header_image', 'label' => esc_html__( 'Header BG Size', 'allinone' ), 'choices' => array( '1' => esc_html__( 'Small', 'allinone' ), '2' => esc_html__( 'Medium', 'allinone' ), '3' => esc_html__( 'Large', 'allinone' ), ) ) ); $wp_customize->add_setting('ed_header_bg_fixed', array( 'default' => $allinone_default['ed_header_bg_fixed'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'allinone_sanitize_checkbox', ) ); $wp_customize->add_control('ed_header_bg_fixed', array( 'label' => esc_html__('Enable Fixed BG', 'allinone'), 'section' => 'header_image', 'type' => 'checkbox', ) ); $wp_customize->add_setting('ed_header_bg_overlay', array( 'default' => $allinone_default['ed_header_bg_overlay'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'allinone_sanitize_checkbox', ) ); $wp_customize->add_control('ed_header_bg_overlay', array( 'label' => esc_html__('Enable BG Overlay', 'allinone'), 'section' => 'header_image', 'type' => 'checkbox', ) ); // Trending News Section $wp_customize->add_section( 'header_news_section', array( 'title' => esc_html__( 'Main Navigation Area', 'allinone' ), 'priority' => 15, 'capability' => 'edit_theme_options', 'panel' => 'theme_option_panel', ) ); $wp_customize->add_setting('ed_header_trending_news', array( 'default' => $allinone_default['ed_header_trending_news'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'allinone_sanitize_checkbox', ) ); $wp_customize->add_control('ed_header_trending_news', array( 'label' => esc_html__('Enable Trending News', 'allinone'), 'section' => 'header_news_section', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'allinone_header_trending_cat', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'allinone_sanitize_select', ) ); $wp_customize->add_control( 'allinone_header_trending_cat', array( 'label' => esc_html__( 'Trending News Posts Category', 'allinone' ), 'section' => 'header_news_section', 'type' => 'select', 'choices' => $allinone_post_category_list, ) );