add_section( 'section_about_us', array( 'title' => __( 'About Us Section', 'business-carter' ), 'priority' => 100, 'capability' => 'edit_theme_options', 'panel' => 'home_page_panel', ) ); // Enable About Us Section $wp_customize->add_setting('theme_options[enable_about_us_section]', array( 'default' => $default['enable_about_us_section'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'business_carter_sanitize_checkbox' ) ); $wp_customize->add_control('theme_options[enable_about_us_section]', array( 'label' => __('Enable Section', 'business-carter'), 'description' => __('Go to Customize - Homepage Settings. Select A static page. Set Homepage as Home and Posts page as Blog to show this section.', 'business-carter'), 'section' => 'section_about_us', 'settings' => 'theme_options[enable_about_us_section]', 'type' => 'checkbox', ) ); // Image $wp_customize->add_setting('theme_options[business_carter_about_us_image]', array( 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'business_carter_sanitize_image' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'theme_options[business_carter_about_us_image]', array( 'label' => __('Image', 'business-carter'), 'section' => 'section_about_us', 'settings' => 'theme_options[business_carter_about_us_image]', 'active_callback' => 'business_carter_about_us_active', 'type' => 'image', ) ) ); // Subtitle $wp_customize->add_setting('theme_options[business_carter_about_us_subtitle]', array( 'default' => $default['business_carter_about_us_subtitle'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control('theme_options[business_carter_about_us_subtitle]', array( 'label' => __('Subtitle', 'business-carter'), 'section' => 'section_about_us', 'settings' => 'theme_options[business_carter_about_us_subtitle]', 'active_callback' => 'business_carter_about_us_active', 'type' => 'text' ) ); // Title $wp_customize->add_setting('theme_options[business_carter_about_us_title]', array( 'default' => $default['business_carter_about_us_title'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control('theme_options[business_carter_about_us_title]', array( 'label' => __('Title', 'business-carter'), 'section' => 'section_about_us', 'settings' => 'theme_options[business_carter_about_us_title]', 'active_callback' => 'business_carter_about_us_active', 'type' => 'text' ) ); // Content $wp_customize->add_setting('theme_options[business_carter_about_us_content]', array( 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'business_carter_sanitize_textarea_content' ) ); $wp_customize->add_control('theme_options[business_carter_about_us_content]', array( 'label' => sprintf( __('Content', 'business-carter')), 'section' => 'section_about_us', 'settings' => 'theme_options[business_carter_about_us_content]', 'active_callback' => 'business_carter_about_us_active', 'type' => 'textarea' ) ); // Button Label $wp_customize->add_setting('theme_options[business_carter_about_us_btn_label]', array( 'default' => $default['business_carter_about_us_btn_label'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control('theme_options[business_carter_about_us_btn_label]', array( 'label' => sprintf( __('Button Label', 'business-carter')), 'section' => 'section_about_us', 'settings' => 'theme_options[business_carter_about_us_btn_label]', 'active_callback' => 'business_carter_about_us_active', 'type' => 'text' ) ); // Button Url $wp_customize->add_setting('theme_options[business_carter_about_us_btn_url]', array( 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control('theme_options[business_carter_about_us_btn_url]', array( 'label' => sprintf( __('Button Url', 'business-carter')), 'section' => 'section_about_us', 'settings' => 'theme_options[business_carter_about_us_btn_url]', 'active_callback' => 'business_carter_about_us_active', 'type' => 'url' ) );