add_section( 'about_section_settings', array( 'title' => esc_html__( 'About Section', 'bizprime' ), 'priority' => 300, 'capability' => 'edit_theme_options', 'panel' => 'theme_front_page_section', ) ); // Setting - show-about-section. $wp_customize->add_setting( 'theme_options[show-about-section]', array( 'default' => $default['show-about-section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show-about-section]', array( 'label' => esc_html__( 'Enable About', 'bizprime' ), 'section' => 'about_section_settings', 'type' => 'checkbox', 'priority' => 100, ) ); // Setting - show-about-section. $wp_customize->add_setting( 'theme_options[select-about-main-page]', array( 'default' => $default['select-about-main-page'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'theme_options[select-about-main-page]', array( 'label' => esc_html__( 'Select Main About Page', 'bizprime' ), 'section' => 'about_section_settings', 'type' => 'dropdown-pages', 'priority' => 130, ) ); /*about sub page*/ for ( $i=1; $i <= 3; $i++ ) { $wp_customize->add_setting( 'theme_options[select-about-sub-page-'. $i .']', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'theme_options[select-about-sub-page-'. $i .']', array( 'input_attrs' => array( 'style' => 'width: 250px;' ), 'label' => esc_html__( 'About Section Sub Page', 'bizprime' ) . ' - ' . $i , 'priority' => '120' . $i, 'section' => 'about_section_settings', 'type' => 'dropdown-pages', 'priority' => 150, ) ); } /*No of about*/ $wp_customize->add_setting( 'theme_options[number-of-home-about]', array( 'default' => $default['number-of-home-about'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[number-of-home-about]', array( 'label' => esc_html__( 'Select No Of About', 'bizprime' ), 'description' => __( 'After choosing "Select No Of About" option please save and publish and refresh to get actual no of field for icon and page bellow.', 'bizprime' ), 'section' => 'about_section_settings', 'choices' => array( '1' => __( '1', 'bizprime' ), '2' => __( '2', 'bizprime' ), '3' => __( '3', 'bizprime' ), '4' => __( '4', 'bizprime' ), '5' => __( '5', 'bizprime' ), '6' => __( '6', 'bizprime' ), ), 'type' => 'select', 'priority' => 170, ) ); /*No of font icon*/ for ( $i=1; $i <= bizprime_get_option( 'number-of-home-about' ) ; $i++ ) { $wp_customize->add_setting( 'theme_options[number-of-home-about-fa-icon_'. $i .']', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'theme_options[number-of-home-about-fa-icon_'. $i .']', array( 'input_attrs' => array( 'style' => 'width: 250px;' ), 'label' => esc_html__( 'Font Icon', 'bizprime' ) . ' - ' . $i , 'description' => sprintf( __( 'Use font awesome icon: Eg: %s. %sSee more here%s', 'bizprime' ), 'fa-desktop','','' ), 'priority' => '120' . $i, 'section' => 'about_section_settings', 'type' => 'text', 'priority' => 180, 'active_callback' => 'bizprime_is_select_page_about', ) ); } /*content excerpt in about*/ $wp_customize->add_setting( 'theme_options[number-of-content-home-about]', array( 'default' => $default['number-of-content-home-about'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_positive_integer', ) ); $wp_customize->add_control( 'theme_options[number-of-content-home-about]', array( 'label' => esc_html__( 'Select No Words Of About', 'bizprime' ), 'section' => 'about_section_settings', 'type' => 'number', 'priority' => 190, 'input_attrs' => array( 'min' => 1, 'max' => 200, 'style' => 'width: 150px;' ), ) ); // Setting - select-about-from. $wp_customize->add_setting( 'theme_options[select-about-from]', array( 'default' => $default['select-about-from'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[select-about-from]', array( 'label' => esc_html__( 'Select about From', 'bizprime' ), 'section' => 'about_section_settings', 'type' => 'select', 'choices' => array( 'from-page' => __( 'Page', 'bizprime' ), 'from-category' => __( 'Category', 'bizprime' ) ), 'priority' => 210, ) ); for ( $i=1; $i <= bizprime_get_option( 'number-of-home-about' ) ; $i++ ) { $wp_customize->add_setting( 'theme_options[select-page-for-about_'. $i .']', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'theme_options[select-page-for-about_'. $i .']', array( 'input_attrs' => array( 'style' => 'width: 50px;' ), 'label' => __( 'about From Page', 'bizprime' ) . ' - ' . $i , 'priority' => '120' . $i, 'section' => 'about_section_settings', 'type' => 'dropdown-pages', 'priority' => 220, 'active_callback' => 'bizprime_is_select_page_about', ) ); } // Setting - drop down category for about. $wp_customize->add_setting( 'theme_options[select-category-for-about]', array( 'default' => $default['select-category-for-about'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Bizprime_Dropdown_Taxonomies_Control( $wp_customize, 'theme_options[select-category-for-about]', array( 'label' => __( 'Category For About Section', 'bizprime' ), 'description' => __( 'Select category to be shown on tab ', 'bizprime' ), 'section' => 'about_section_settings', 'type' => 'dropdown-taxonomies', 'taxonomy' => 'category', 'priority' => 230, 'active_callback' => 'bizprime_is_select_cat_about', ) ) );