add_section( 'main_header_setting', array( 'title' => esc_html__( 'Header Settings', 'primebulletin' ), 'priority' => 10, 'capability' => 'edit_theme_options', 'panel' => 'theme_option_panel', ) ); $wp_customize->add_setting('ed_header_ad', array( 'default' => $primebulletin_default['ed_header_ad'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'primebulletin_sanitize_checkbox', ) ); $wp_customize->add_control('ed_header_ad', array( 'label' => esc_html__('Enable Top Advertisement Area', 'primebulletin'), 'section' => 'main_header_setting', 'type' => 'checkbox', ) ); $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', 'primebulletin' ), 'section' => 'main_header_setting', 'active_callback' => 'primebulletin_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', 'primebulletin'), 'section' => 'main_header_setting', 'type' => 'text', 'active_callback' => 'primebulletin_header_ad_ac', ) ); // Archive Layout. $wp_customize->add_setting( 'primebulletin_header_bg_size', array( 'default' => $primebulletin_default['primebulletin_header_bg_size'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' ) ); $wp_customize->add_control('primebulletin_header_bg_size', array( 'type' => 'select', 'section' => 'header_image', 'label' => esc_html__( 'Header BG Size', 'primebulletin' ), 'choices' => array( '1' => esc_html__( 'Small', 'primebulletin' ), '2' => esc_html__( 'Medium', 'primebulletin' ), '3' => esc_html__( 'Large', 'primebulletin' ), ) ) ); $wp_customize->add_setting('ed_header_bg_fixed', array( 'default' => $primebulletin_default['ed_header_bg_fixed'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'primebulletin_sanitize_checkbox', ) ); $wp_customize->add_control('ed_header_bg_fixed', array( 'label' => esc_html__('Enable Fixed BG', 'primebulletin'), 'section' => 'header_image', 'type' => 'checkbox', ) ); $wp_customize->add_setting('ed_header_bg_overlay', array( 'default' => $primebulletin_default['ed_header_bg_overlay'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'primebulletin_sanitize_checkbox', ) ); $wp_customize->add_control('ed_header_bg_overlay', array( 'label' => esc_html__('Enable BG Overlay', 'primebulletin'), 'section' => 'header_image', 'type' => 'checkbox', ) ); // Ticker Section $wp_customize->add_section( 'header_ticker_section', array( 'title' => esc_html__( 'Breaking News Ticker', 'primebulletin' ), 'priority' => 10, 'capability' => 'edit_theme_options', 'panel' => 'theme_option_panel', ) ); $wp_customize->add_setting('ed_header_ticker_posts', array( 'default' => $primebulletin_default['ed_header_ticker_posts'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'primebulletin_sanitize_checkbox', ) ); $wp_customize->add_control('ed_header_ticker_posts', array( 'label' => esc_html__('Enable Ticker Posts', 'primebulletin'), 'section' => 'header_ticker_section', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'ed_header_ticker_posts_title', array( 'default' => $primebulletin_default['ed_header_ticker_posts_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'ed_header_ticker_posts_title', array( 'label' => esc_html__( 'Ticker Section Title', 'primebulletin' ), 'section' => 'header_ticker_section', 'type' => 'text', ) ); $wp_customize->add_setting( 'primebulletin_header_ticker_cat', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'primebulletin_sanitize_select', ) ); $wp_customize->add_control( 'primebulletin_header_ticker_cat', array( 'label' => esc_html__( 'Ticker Posts Category', 'primebulletin' ), 'section' => 'header_ticker_section', 'type' => 'select', 'choices' => $primebulletin_post_category_list, ) ); $wp_customize->add_setting('ed_ticker_slider_autoplay', array( 'default' => $primebulletin_default['ed_ticker_slider_autoplay'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'primebulletin_sanitize_checkbox', ) ); $wp_customize->add_control('ed_ticker_slider_autoplay', array( 'label' => esc_html__('Enable Ticker Posts Autoplay', 'primebulletin'), 'section' => 'header_ticker_section', 'type' => 'checkbox', ) ); $wp_customize->add_setting('ed_ticker_slider_wide_layout', array( 'default' => $primebulletin_default['ed_ticker_slider_wide_layout'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'primebulletin_sanitize_checkbox', ) ); $wp_customize->add_control('ed_ticker_slider_wide_layout', array( 'label' => esc_html__('Enable Ticker Wide Layout', 'primebulletin'), 'section' => 'header_ticker_section', 'type' => 'checkbox', ) ); // Trending News Section $wp_customize->add_section( 'header_news_section', array( 'title' => esc_html__( 'Trending News Settings', 'primebulletin' ), 'priority' => 10, 'capability' => 'edit_theme_options', 'panel' => 'theme_option_panel', ) ); $wp_customize->add_setting('ed_header_trending_news', array( 'default' => $primebulletin_default['ed_header_trending_news'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'primebulletin_sanitize_checkbox', ) ); $wp_customize->add_control('ed_header_trending_news', array( 'label' => esc_html__('Enable Trending News', 'primebulletin'), 'section' => 'header_news_section', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'ed_header_trending_posts_title', array( 'default' => $primebulletin_default['ed_header_trending_posts_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'ed_header_trending_posts_title', array( 'label' => esc_html__( 'Trending News Title', 'primebulletin' ), 'section' => 'header_news_section', 'type' => 'text', ) ); $wp_customize->add_setting( 'primebulletin_header_trending_cat', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'primebulletin_sanitize_select', ) ); $wp_customize->add_control( 'primebulletin_header_trending_cat', array( 'label' => esc_html__( 'Trending News Posts Category', 'primebulletin' ), 'section' => 'header_news_section', 'type' => 'select', 'choices' => $primebulletin_post_category_list, ) );