add_section( 'portfolio-section-settings', array( 'title' => __( 'Portfolio Section', 'bizprime' ), 'priority' => 180, 'capability' => 'edit_theme_options', 'panel' => 'theme_front_page_section', ) ); // Setting - show-portfolio-section. $wp_customize->add_setting( 'theme_options[show-portfolio-section]', array( 'default' => $default['show-portfolio-section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show-portfolio-section]', array( 'label' => __( 'Enable portfolio', 'bizprime' ), 'section' => 'portfolio-section-settings', 'type' => 'checkbox', 'priority' => 100, ) ); // Setting - main-title-portfolio-section. $wp_customize->add_setting( 'theme_options[main-title-portfolio-section]', array( 'default' => $default['main-title-portfolio-section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'theme_options[main-title-portfolio-section]', array( 'label' => __( 'Section Title', 'bizprime' ), 'section' => 'portfolio-section-settings', 'type' => 'text', 'priority' => 100, ) ); for ( $i=1; $i <= 3 ; $i++ ) { // Setting - drop down category for portfolio. $wp_customize->add_setting( 'theme_options[select-category-for-portfolio-'. $i .']', array( 'default' => $default['select_category_for_portfolio'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Bizprime_Dropdown_Taxonomies_Control( $wp_customize, 'theme_options[select-category-for-portfolio-'. $i .']', array( 'label' => __( 'Category For portfolio Section', 'bizprime' ) . ' - ' . $i , 'description' => __( 'If category is selected the latest post from category will be published', 'bizprime' ), 'section' => 'portfolio-section-settings', 'type' => 'dropdown-taxonomies', 'taxonomy' => 'category', 'priority' => 110, ) ) ); } /*button text*/ $wp_customize->add_setting( 'theme_options[portfolio-button-text]', array( 'default' => $default['portfolio-button-text'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'theme_options[portfolio-button-text]', array( 'label' => __( 'Button Text', 'bizprime' ), 'description' => __( 'Removing the text from this section will disable the button on portfolio section', 'bizprime' ), 'section' => 'portfolio-section-settings', 'type' => 'text', 'priority' => 120, ) ); /*button url*/ $wp_customize->add_setting( 'theme_options[portfolio-button-link]', array( 'default' => $default['portfolio-button-link'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'theme_options[portfolio-button-link]', array( 'label' => __( 'URL Link', 'bizprime' ), 'section' => 'portfolio-section-settings', 'type' => 'text', 'priority' => 130, ) );