add_section( 'home_page_service_option', array( 'title' => __( 'Service Section Options', 'biziness' ), 'panel' => 'theme_home_option_panel', ) ); $wp_customize->add_setting( 'biziness_options[enable_service_section]', array( 'default' => $default_options['enable_service_section'], 'sanitize_callback' => 'biziness_sanitize_checkbox', ) ); $wp_customize->add_control( 'biziness_options[enable_service_section]', array( 'label' => __( 'Enable Service Section', 'biziness' ), 'section' => 'home_page_service_option', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'biziness_options[service_post_title]', array( 'default' => $default_options['service_post_title'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'biziness_options[service_post_title]', array( 'label' => __( 'Service Section Title', 'biziness' ), 'section' => 'home_page_service_option', 'type' => 'text', ) ); $wp_customize->add_setting( 'biziness_options[service_post_sub_title]', array( 'default' => $default_options['service_post_sub_title'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'biziness_options[service_post_sub_title]', array( 'label' => __( 'Service Section Sub Title', 'biziness' ), 'section' => 'home_page_service_option', 'type' => 'text', ) ); $wp_customize->add_setting( 'biziness_options[service_post_description]', array( 'default' => $default_options['service_post_description'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'biziness_options[service_post_description]', array( 'label' => __( 'Service Section Description', 'biziness' ), 'section' => 'home_page_service_option', 'type' => 'textarea', ) ); for ( $i=1; $i <= 5 ; $i++ ) { $wp_customize->add_setting( 'biziness_options[upload_service_image_'.$i.']', array( 'default' => '', 'sanitize_callback' => 'biziness_sanitize_image', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'biziness_options[upload_service_image_'.$i.']', array( 'label' => __( 'Upload Service Icon Image -', 'biziness' ). $i, 'section' => 'home_page_service_option', ) ) ); $wp_customize->add_setting( 'service_select_page_'. $i, array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'biziness_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'service_select_page_'. $i, array( 'input_attrs' => array( 'style' => 'width: 50px;' ), 'label' => __( 'Service Page', 'biziness' ) . ' - ' . $i , 'section' => 'home_page_service_option', 'type' => 'dropdown-pages', ) ); }