add_panel( 'theme_home_option_panel', array( 'title' => __('Front Page Options', 'avenews'), 'description' => __('Contains all front page settings', 'avenews'), 'priority' => 150 ) ); /**/ $wp_customize->add_section( 'home_page_banner_option', array( 'title' => __('Main Banner Options', 'avenews'), 'panel' => 'theme_home_option_panel', ) ); /* Home Page Layout */ $wp_customize->add_setting( 'avenews_options[enable_banner_section]', array( 'default' => $default_options['enable_banner_section'], 'sanitize_callback' => 'avenews_sanitize_checkbox', ) ); $wp_customize->add_control( 'avenews_options[enable_banner_section]', array( 'label' => __('Enable Banner Section', 'avenews'), 'section' => 'home_page_banner_option', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'avenews_options[number_of_slider_post]', array( 'default' => $default_options['number_of_slider_post'], 'sanitize_callback' => 'avenews_sanitize_select', ) ); $wp_customize->add_control( 'avenews_options[number_of_slider_post]', array( 'label' => __('Post In Slider', 'avenews'), 'section' => 'home_page_banner_option', 'type' => 'select', 'choices' => array( '3' => __('3', 'avenews'), '4' => __('4', 'avenews'), '5' => __('5', 'avenews'), '6' => __('6', 'avenews'), ), ) ); $wp_customize->add_setting( 'avenews_options[banner_section_cat]', array( 'default' => $default_options['banner_section_cat'], 'sanitize_callback' => 'avenews_sanitize_select', ) ); $wp_customize->add_control( 'avenews_options[banner_section_cat]', array( 'label' => __('Choose Banner Category', 'avenews'), 'section' => 'home_page_banner_option', 'type' => 'select', 'choices' => avenews_post_category_list(), ) ); $wp_customize->add_setting( 'avenews_options[enable_banner_post_description]', array( 'default' => $default_options['enable_banner_post_description'], 'sanitize_callback' => 'avenews_sanitize_checkbox', ) ); $wp_customize->add_control( 'avenews_options[enable_banner_post_description]', array( 'label' => __('Enable Post Description', 'avenews'), 'section' => 'home_page_banner_option', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'avenews_options[enable_banner_cat_meta]', array( 'default' => $default_options['enable_banner_cat_meta'], 'sanitize_callback' => 'avenews_sanitize_checkbox', ) ); $wp_customize->add_control( 'avenews_options[enable_banner_cat_meta]', array( 'label' => __('Enable Category Meta', 'avenews'), 'section' => 'home_page_banner_option', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'avenews_options[enable_banner_cat_meta_color]', array( 'default' => $default_options['enable_banner_cat_meta_color'], 'sanitize_callback' => 'avenews_sanitize_checkbox', ) ); $wp_customize->add_control( 'avenews_options[enable_banner_cat_meta_color]', array( 'label' => __('Categories have background color', 'avenews'), 'section' => 'home_page_banner_option', 'type' => 'checkbox', 'active_callback' => 'avenews_is_enable_banner_cat_meta' ) ); $wp_customize->add_setting( 'avenews_options[enable_banner_author_meta]', array( 'default' => $default_options['enable_banner_author_meta'], 'sanitize_callback' => 'avenews_sanitize_checkbox', ) ); $wp_customize->add_control( 'avenews_options[enable_banner_author_meta]', array( 'label' => __('Enable Author Meta', 'avenews'), 'section' => 'home_page_banner_option', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'avenews_options[enable_banner_date_meta]', array( 'default' => $default_options['enable_banner_date_meta'], 'sanitize_callback' => 'avenews_sanitize_checkbox', ) ); $wp_customize->add_control( 'avenews_options[enable_banner_date_meta]', array( 'label' => __('Enable Date On Banner', 'avenews'), 'section' => 'home_page_banner_option', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'avenews_options[enable_banner_overlay]', array( 'default' => $default_options['enable_banner_overlay'], 'sanitize_callback' => 'avenews_sanitize_checkbox', ) ); $wp_customize->add_control( 'avenews_options[enable_banner_overlay]', array( 'label' => __('Enable Banner Overlay', 'avenews'), 'section' => 'home_page_banner_option', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'avenews_options[banner_button_text]', array( 'default' => $default_options['banner_button_text'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'avenews_options[banner_button_text]', array( 'label' => __('Banner Button Text', 'avenews'), 'section' => 'home_page_banner_option', 'type' => 'text', ) );