add_section('bellini_frontpage_section_slider',array( 'title' => esc_html__( 'Slider / Hero Image', 'bellini' ), 'capability' => 'edit_theme_options', 'priority' => 1, 'panel' => 'bellini_frontpage_panel', ) ); // Front Page Feature Blocks $wp_customize->add_section('bellini_frontpage_section_blocks',array( 'title' => esc_html__( 'Feature Blocks', 'bellini' ), 'capability' => 'edit_theme_options', 'priority' => 2, 'panel' => 'bellini_frontpage_panel', ) ); // Front Page Section Category $wp_customize->add_section('bellini_frontpage_section_category',array( 'title' => esc_html__( 'WooCommerce Category', 'bellini' ), 'capability' => 'edit_theme_options', 'priority' => 2, 'panel' => 'bellini_frontpage_panel', 'active_callback' => 'is_plugin_active_woocommerce_bellini', 'description' => esc_html__('Display WooCommerce Product Categories','bellini'), ) ); // Front Page WooCommerce Products $wp_customize->add_section('bellini_frontpage_section_product',array( 'title' => esc_html__( 'WooCommerce Products', 'bellini' ), 'capability' => 'edit_theme_options', 'priority' => 3, 'panel' => 'bellini_frontpage_panel', 'active_callback' => 'is_plugin_active_woocommerce_bellini', ) ); // Front Page Section Featured Product $wp_customize->add_section('bellini_frontpage_section_featured',array( 'title' => esc_html__( 'WooCommerce Featured Slider', 'bellini' ), 'capability' => 'edit_theme_options', 'priority' => 4, 'panel' => 'bellini_frontpage_panel', 'active_callback' => 'is_plugin_active_woocommerce_bellini', ) ); // Homepage Blog Posts $wp_customize->add_section('bellini_frontpage_section_blog',array( 'title' => esc_html__( 'Blog Posts', 'bellini' ), 'capability' => 'edit_theme_options', 'priority' => 5, 'panel' => 'bellini_frontpage_panel', ) ); // Text Field $wp_customize->add_section('bellini_frontpage_section_text_field',array( 'title' => esc_html__( 'Text Field', 'bellini' ), 'capability' => 'edit_theme_options', 'priority' => 6, 'panel' => 'bellini_frontpage_panel', ) ); // Reorder Frontpage Section $wp_customize->add_section('bellini_frontpage_section_reorder',array( 'title' => esc_html__( 'Re-order Frontpage Section', 'bellini' ), 'capability' => 'edit_theme_options', 'priority' => 20, 'panel' => 'bellini_frontpage_panel', ) ); /*-------------------------------------------------------------- ## Section: Static Front Page --------------------------------------------------------------*/ $setup_frontpage_template_description = sprintf( __( 'To display frontpage sections, follow these steps:
  1. Open a new window and Go to Dashboard -> Pages -> Add New
  2. On the right, you will find a box titled Page Attributes
  3. Select Homepage from the Template section
  4. Now Click on Publish
  5. Now select A static page from the frontpage displays below
  6. Select your Homepage template assigned page as Front Page
  7. Click on Save & Publish

Check Documentation', 'bellini' ), esc_url( 'http://www.pangolinthemes.com' )); $wp_customize->add_setting( 'bellini_frontpage_helper_documentation', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_frontpage_helper_documentation', array( 'type' => 'info', 'label' => esc_html__('Setting up Front Page','bellini'), 'description' => $setup_frontpage_template_description, 'section' => 'static_front_page', 'settings' => 'bellini_frontpage_helper_documentation', 'priority' => 100, )) ); /*-------------------------------------------------------------- ## Section: Hero Image --------------------------------------------------------------*/ // Slider Type -- Settings $wp_customize->add_setting( 'bellini_front_slider_type' , array( 'default' => 1, 'type' => 'option', 'sanitize_callback' => 'absint', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'bellini_front_slider_type',array( 'label' => esc_html__( 'Slider Type', 'bellini' ), 'description' => esc_html__( 'Choose your frontpage slider type.', 'bellini' ), 'section' => 'bellini_frontpage_section_slider', 'settings' => 'bellini_front_slider_type', 'priority' => 1, 'type' => 'radio', 'choices' => array( 1 => esc_html__( 'Bellini Hero Section', 'bellini' ), 2 => esc_html__( '3rd Party Sliders', 'bellini' ), ), ) ); // Show Frontpage Slider on All Pages $wp_customize->add_setting( 'bellini_show_frontpage_slider_pages' , array( 'default' => true, 'type' => 'option', 'sanitize_callback' => 'sanitize_key', 'transport' => 'refresh' ) ); $wp_customize->add_control( 'bellini_show_frontpage_slider_pages',array( 'label' => esc_html__( 'Show Frontpage Slider on All Pages', 'bellini' ), 'section' => 'bellini_frontpage_section_slider', 'settings' => 'bellini_show_frontpage_slider_pages', 'priority' => 2, 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'hero_section_content_title', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', 'active_callback' => 'is_active_slider_type_bellini_hero', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'hero_section_content_title', array( 'type' => 'info', 'label' => esc_html__('Hero Section - Image','bellini'), 'section' => 'bellini_frontpage_section_slider', 'settings' => 'hero_section_content_title', 'priority' => 2, 'active_callback' => 'is_active_slider_type_bellini_hero', )) ); //Hero Image $wp_customize->add_setting('bellini_static_slider_image', array( 'type' => 'option', 'default' => get_template_directory_uri() . '/images/slider.jpg', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', 'active_callback' => 'is_active_slider_type_bellini_hero', ) ); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'bellini_static_slider_image',array( 'section' => 'bellini_frontpage_section_slider', 'settings' => 'bellini_static_slider_image', 'priority' => 2, 'active_callback' => 'is_active_slider_type_bellini_hero', ) )); $wp_customize->add_setting( 'hero_section_content_title_helper', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', 'active_callback' => 'is_active_slider_type_bellini_hero', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'hero_section_content_title_helper', array( 'type' => 'info', 'label' => esc_html__('Hero Section - Content','bellini'), 'section' => 'bellini_frontpage_section_slider', 'settings' => 'hero_section_content_title_helper', 'priority' => 3, 'active_callback' => 'is_active_slider_type_bellini_hero', )) ); //Hero Image Headline $wp_customize->add_setting('bellini_static_slider_title', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', 'active_callback' => 'is_active_slider_type_bellini_hero', ) ); $wp_customize->add_control('bellini_static_slider_title',array( 'type' =>'text', 'input_attrs' => array('placeholder' => esc_html__( 'Title', 'bellini' ),), 'section' => 'bellini_frontpage_section_slider', 'settings' => 'bellini_static_slider_title', 'priority' => 4, 'active_callback' => 'is_active_slider_type_bellini_hero', )); //Hero Image Content $wp_customize->add_setting('bellini_static_slider_content', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', 'active_callback' => 'is_active_slider_type_bellini_hero', ) ); $wp_customize->add_control('bellini_static_slider_content',array( 'type' =>'textarea', 'section' => 'bellini_frontpage_section_slider', 'settings' => 'bellini_static_slider_content', 'priority' => 5, 'active_callback' => 'is_active_slider_type_bellini_hero', )); $wp_customize->add_setting( 'hero_section_button_title_helper', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', 'active_callback' => 'is_active_slider_type_bellini_hero', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'hero_section_button_title_helper', array( 'type' => 'info', 'label' => esc_html__('Hero Section - Buttons','bellini'), 'section' => 'bellini_frontpage_section_slider', 'settings' => 'hero_section_button_title_helper', 'priority' => 6, 'active_callback' => 'is_active_slider_type_bellini_hero', )) ); //Button Text $wp_customize->add_setting('bellini_static_slider_button_text-1', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', 'active_callback' => 'is_active_slider_type_bellini_hero', ) ); $wp_customize->add_control('bellini_static_slider_button_text-1',array( 'type' =>'text', 'section' => 'bellini_frontpage_section_slider', 'settings' => 'bellini_static_slider_button_text-1', 'priority' => 7, 'active_callback' => 'is_active_slider_type_bellini_hero', 'input_attrs' => array('placeholder' => esc_html__( 'Button 1 Text', 'bellini' ),), )); //Button URL $wp_customize->add_setting('bellini_static_slider_button_url-1', array( 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'postMessage', 'active_callback' => 'is_active_slider_type_bellini_hero', ) ); $wp_customize->add_control('bellini_static_slider_button_url-1',array( 'type' =>'url', 'section' => 'bellini_frontpage_section_slider', 'settings' => 'bellini_static_slider_button_url-1', 'priority' => 8, 'active_callback' => 'is_active_slider_type_bellini_hero', 'input_attrs' => array('placeholder' => esc_html__( 'Button 1 URL', 'bellini' ),), )); //Button Text $wp_customize->add_setting('bellini_static_slider_button_text-2', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', 'active_callback' => 'is_active_slider_type_bellini_hero', ) ); $wp_customize->add_control('bellini_static_slider_button_text-2',array( 'type' =>'text', 'section' => 'bellini_frontpage_section_slider', 'settings' => 'bellini_static_slider_button_text-2', 'priority' => 9, 'active_callback' => 'is_active_slider_type_bellini_hero', 'input_attrs' => array('placeholder' => esc_html__( 'Button 2 Text', 'bellini' ),), )); //Button URL $wp_customize->add_setting('bellini_static_slider_button_url-2', array( 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'postMessage', 'active_callback' => 'is_active_slider_type_bellini_hero', ) ); $wp_customize->add_control('bellini_static_slider_button_url-2',array( 'type' =>'url', 'section' => 'bellini_frontpage_section_slider', 'settings' => 'bellini_static_slider_button_url-2', 'priority' => 10, 'active_callback' => 'is_active_slider_type_bellini_hero', 'input_attrs' => array('placeholder' => esc_html__( 'Button 2 URL', 'bellini' ),), )); $wp_customize->add_setting( 'bellini_hero_section_color_title_helper', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', 'active_callback' => 'is_active_slider_type_bellini_hero', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_hero_section_color_title_helper', array( 'type' => 'info', 'label' => esc_html__('Hero Section - Color','bellini'), 'section' => 'bellini_frontpage_section_slider', 'settings' => 'bellini_hero_section_color_title_helper', 'priority' => 11, 'active_callback' => 'is_active_slider_type_bellini_hero', )) ); // Hero Content Color -- Settings $wp_customize->add_setting( 'bellini_hero_content_color' , array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', 'active_callback' => 'is_active_slider_type_bellini_hero', 'type' => 'option', ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'bellini_hero_content_color', array( 'section' => 'bellini_frontpage_section_slider', 'settings' => 'bellini_hero_content_color', 'priority' => 12, 'active_callback' => 'is_active_slider_type_bellini_hero', 'label' => esc_html__( 'Content Color', 'bellini' ), ) )); // Button 1 Color $wp_customize->add_setting( 'bellini_static_slider_button_background_one' , array( 'default' => '#00B0FF', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', 'active_callback' => 'is_active_slider_type_bellini_hero', 'type' => 'option', ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'bellini_static_slider_button_background_one', array( 'label' => esc_html__( 'Button 1 Color', 'bellini' ), 'section' => 'bellini_frontpage_section_slider', 'settings' => 'bellini_static_slider_button_background_one', 'priority' => 13, 'active_callback' => 'is_active_slider_type_bellini_hero', ) )); // Button 2 Background Color $wp_customize->add_setting( 'bellini_static_slider_button_background_two' , array( 'default' => '#00B0FF', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', 'active_callback' => 'is_active_slider_type_bellini_hero', 'type' => 'option', ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'bellini_static_slider_button_background_two', array( 'label' => esc_html__( 'Button 2 Color', 'bellini' ), 'section' => 'bellini_frontpage_section_slider', 'settings' => 'bellini_static_slider_button_background_two', 'priority' => 14, 'active_callback' => 'is_active_slider_type_bellini_hero', ) )); $wp_customize->add_setting( 'hero_section_mobile_title', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', 'active_callback' => 'is_active_slider_type_bellini_hero', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'hero_section_mobile_title', array( 'type' => 'info', 'label' => esc_html__('Hero Section - Mobile Settings','bellini'), 'section' => 'bellini_frontpage_section_slider', 'settings' => 'hero_section_mobile_title', 'priority' => 15, 'active_callback' => 'is_active_slider_type_bellini_hero', )) ); // Mobile Background Color -- Settings $wp_customize->add_setting( 'slider_background_color_mobile' , array( 'default' => '#eceef1', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', 'active_callback' => 'is_active_slider_type_bellini_hero', 'type' => 'option', ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'slider_background_color_mobile', array( 'label' => esc_html__( 'Background Color', 'bellini' ), 'section' => 'bellini_frontpage_section_slider', 'settings' => 'slider_background_color_mobile', 'priority' => 16, 'active_callback' => 'is_active_slider_type_bellini_hero', ) )); // Mobile Text Color -- Settings $wp_customize->add_setting( 'slider_text_color_mobile' , array( 'default' => '#333', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', 'active_callback' => 'is_active_slider_type_bellini_hero', 'type' => 'option', ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'slider_text_color_mobile', array( 'label' => esc_html__( 'Content Color', 'bellini' ), 'section' => 'bellini_frontpage_section_slider', 'settings' => 'slider_text_color_mobile', 'priority' => 17, 'active_callback' => 'is_active_slider_type_bellini_hero', ) )); $third_party_slider_description = sprintf( __( 'You can insert below sliders shortcode here
Meta Slider
Smart Slider 3
Soliloquy
etc.
', 'bellini' ), esc_url( 'https://wordpress.org/plugins/ml-slider/' ), esc_url( 'https://wordpress.org/plugins/smart-slider-3/' ), esc_url( 'https://wordpress.org/plugins/soliloquy-lite/' )); $wp_customize->add_setting('bellini_slider_third_party_field', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', 'active_callback' => 'is_active_slider_type_bellini_third_party', ) ); $wp_customize->add_control('bellini_slider_third_party_field',array( 'type' =>'text', 'label' => esc_html__( '3rd Party Slider Shortcode', 'bellini' ), 'description' => $third_party_slider_description, 'section' => 'bellini_frontpage_section_slider', 'settings' => 'bellini_slider_third_party_field', 'priority' => 18, 'active_callback' => 'is_active_slider_type_bellini_third_party', )); /*-------------------------------------------------------------- ## Section: WooCommerce Category --------------------------------------------------------------*/ $wp_customize->add_setting( 'bellini_woo_category_section_title', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_woo_category_section_title', array( 'type' => 'info', 'label' => esc_html__('Product Category - Content','bellini'), 'section' => 'bellini_frontpage_section_category', 'settings' => 'bellini_woo_category_section_title', 'priority' => 1, )) ); //Category Title $wp_customize->add_setting('bellini_woo_category_title', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('bellini_woo_category_title',array( 'type' =>'text', 'label' => esc_html__( 'Category Title', 'bellini' ), 'section' => 'bellini_frontpage_section_category', 'settings' => 'bellini_woo_category_title', 'priority' => 2, )); //Category Description $wp_customize->add_setting('bellini_woo_category_description', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('bellini_woo_category_description',array( 'type' =>'textarea', 'label' => esc_html__( 'Category Description', 'bellini' ), 'section' => 'bellini_frontpage_section_category', 'settings' => 'bellini_woo_category_description', 'priority' => 3, )); $wp_customize->add_setting( 'bellini_woo_category_option_title', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_woo_category_option_title', array( 'type' => 'info', 'label' => esc_html__('Product Category Layout','bellini'), 'section' => 'bellini_frontpage_section_category', 'settings' => 'bellini_woo_category_option_title', 'priority' => 20, )) ); // Product Category Layout $wp_customize->add_setting( 'woo_product_category_layout' , array( 'default' => 'layout-1', 'type' => 'option', 'sanitize_callback' => 'esc_attr', 'transport' => 'refresh' ) ); $wp_customize->add_control( 'woo_product_category_layout',array( 'label' => esc_html__( 'Category Layout', 'bellini' ), 'section' => 'bellini_frontpage_section_category', 'settings' => 'woo_product_category_layout', 'priority' => 21, 'type' => 'radio', 'choices' => array( 'layout-1' => esc_html__( 'Layout 1', 'bellini' ), ), ) ); // Product Category Column Layout $wp_customize->add_setting( 'woo_product_category_row' , array( 'default' => 'col-sm-3', 'type' => 'option', 'sanitize_callback' => 'esc_attr', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'woo_product_category_row',array( 'label' => esc_html__( 'Display Products Category in a row ', 'bellini' ), 'section' => 'bellini_frontpage_section_category', 'settings' => 'woo_product_category_row', 'priority' => 22, 'type' => 'radio', 'choices' => array( 'col-sm-12' => esc_html__( 'One', 'bellini' ), 'col-sm-6' => esc_html__( 'Two', 'bellini' ), 'col-sm-4' => esc_html__( 'Three', 'bellini' ), 'col-sm-3' => esc_html__( 'Four', 'bellini' ), ), ) ); // Product Category Description Position $wp_customize->add_setting( 'bellini_product_category_des_pos' , array( 'default' => 1, 'type' => 'option', 'sanitize_callback' => 'absint', 'transport' => 'refresh' ) ); $wp_customize->add_control( 'bellini_product_category_des_pos',array( 'label' => esc_html__( 'Category Description Position ', 'bellini' ), 'section' => 'bellini_frontpage_section_category', 'settings' => 'bellini_product_category_des_pos', 'priority' => 23, 'type' => 'radio', 'choices' => array( 1 => esc_html__( 'Top', 'bellini' ), 2 => esc_html__( 'Left', 'bellini' ), 3 => esc_html__( 'Right', 'bellini' ), ), ) ); $wp_customize->add_setting( 'bellini_woo_category_color_title_helper', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_woo_category_color_title_helper', array( 'type' => 'info', 'label' => esc_html__('Product Category - Color & Image','bellini'), 'section' => 'bellini_frontpage_section_category', 'settings' => 'bellini_woo_category_color_title_helper', 'priority' => 30, )) ); // Category Background Color -- Settings $wp_customize->add_setting( 'woo_category_background_color' , array( 'default' => '#FFEB3B', 'sanitize_callback' => 'sanitize_hex_color', 'type' => 'option', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'woo_category_background_color', array( 'label' => esc_html__( 'Background Color', 'bellini' ), 'section' => 'bellini_frontpage_section_category', 'settings' => 'woo_category_background_color', 'priority' => 31, ) )); /*-------------------------------------------------------------- ## Section: WooCommerce Products --------------------------------------------------------------*/ $wp_customize->add_setting( 'bellini_woo_product_section_content_helper', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_woo_product_section_content_helper', array( 'type' => 'info', 'label' => esc_html__('Product Section - Content','bellini'), 'section' => 'bellini_frontpage_section_product', 'settings' => 'bellini_woo_product_section_content_helper', 'priority' => 1, )) ); //Product Title $wp_customize->add_setting('bellini_woo_product_title', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('bellini_woo_product_title',array( 'type' =>'text', 'label' => esc_html__( 'Section Title', 'bellini' ), 'section' => 'bellini_frontpage_section_product', 'settings' => 'bellini_woo_product_title', 'priority' => 2, )); //Product Description $wp_customize->add_setting('bellini_woo_product_description', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('bellini_woo_product_description',array( 'type' =>'textarea', 'label' => esc_html__( 'Section Description', 'bellini' ), 'section' => 'bellini_frontpage_section_product', 'settings' => 'bellini_woo_product_description', 'priority' => 3, )); $wp_customize->add_setting( 'bellini_woo_product_options_title', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_woo_product_options_title', array( 'type' => 'info', 'label' => esc_html__('Product Settings','bellini'), 'section' => 'bellini_frontpage_section_product', 'settings' => 'bellini_woo_product_options_title', 'priority' => 20, )) ); // Products Per Page $wp_customize->add_setting( 'woo_product_per_page_select', array( 'default' => 12, 'type' => 'option', 'sanitize_callback' => 'absint', 'transport' => 'refresh' ) ); $wp_customize->add_control( 'woo_product_per_page_select',array( 'label' => esc_html__( 'Number of Products to Display', 'bellini' ), 'section' => 'bellini_frontpage_section_product', 'settings' => 'woo_product_per_page_select', 'priority' => 21, 'type' => 'text', 'input_attrs' => array('placeholder' => esc_html__( 'example: 2', 'bellini' ),), ) ); if ( is_woocommerce_activated() ) { // WooCommerce Product Category Selection $cats = array('' => esc_html__('All', 'bellini' ),); $prod_categories = get_terms('product_cat'); foreach ( $prod_categories as $categories => $category ){ $cats[$category->slug] = $category->name; } $wp_customize->add_setting( 'bellini_woo_category_selector', array( 'default' => '', 'active_callback' => 'is_plugin_active_woocommerce_bellini', 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( 'bellini_woo_category_selector', array( 'label' => esc_html__( 'Product Category', 'bellini' ), 'description' => esc_html__( 'Select Category you want to display', 'bellini' ), 'settings' => 'bellini_woo_category_selector', 'type' => 'select', 'choices' => $cats, 'section' => 'bellini_frontpage_section_product', 'priority' => 22, 'active_callback' => 'is_plugin_active_woocommerce_bellini', ) ); } // Product Sort $wp_customize->add_setting( 'woo_product_orderby_select', array( 'default' => 'date', 'type' => 'option', 'sanitize_callback' => 'esc_attr', 'transport' => 'refresh' ) ); $wp_customize->add_control( 'woo_product_orderby_select',array( 'label' => esc_html__( 'Sort Products By', 'bellini' ), 'section' => 'bellini_frontpage_section_product', 'settings' => 'woo_product_orderby_select', 'priority' => 23, 'type' => 'radio', 'choices' => array( 'date' => esc_html__( 'Date', 'bellini' ), 'title' => esc_html__( 'Title', 'bellini' ), 'rating' => esc_html__( 'Rating', 'bellini' ), 'popularity' => esc_html__( 'Popularity', 'bellini' ), 'price_desc' => esc_html__( 'Price', 'bellini' ), ), ) ); // Product Sort ASC DESC $wp_customize->add_setting( 'woo_product_order_select', array( 'default' => 'DESC', 'type' => 'option', 'sanitize_callback' => 'esc_attr', 'transport' => 'refresh' ) ); $wp_customize->add_control( 'woo_product_order_select',array( 'label' => esc_html__( 'Sort Products By', 'bellini' ), 'section' => 'bellini_frontpage_section_product', 'settings' => 'woo_product_order_select', 'priority' => 24, 'type' => 'radio', 'choices' => array( 'ASC' => esc_html__( 'Ascending', 'bellini' ), 'DESC' => esc_html__( 'Descending', 'bellini' ), ), ) ); $wp_customize->add_setting( 'bellini_woo_product_cta_title', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_woo_product_cta_title', array( 'type' => 'info', 'label' => esc_html__('Section - Call To Action','bellini'), 'section' => 'bellini_frontpage_section_product', 'settings' => 'bellini_woo_product_cta_title', 'priority' => 30, )) ); //Button Text $wp_customize->add_setting('woo_product_button_text', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('woo_product_button_text',array( 'type' =>'text', 'section' => 'bellini_frontpage_section_product', 'settings' => 'woo_product_button_text', 'priority' => 31, 'input_attrs' => array('placeholder' => esc_html__( 'Button Text', 'bellini' ),), )); //Button URL $wp_customize->add_setting('woo_product_button_url', array( 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'postMessage', ) ); $wp_customize->add_control('woo_product_button_url',array( 'type' =>'url', 'section' => 'bellini_frontpage_section_product', 'settings' => 'woo_product_button_url', 'priority' => 32, 'input_attrs' => array('placeholder' => esc_html__( 'Button URL', 'bellini' ),), )); $wp_customize->add_setting( 'bellini_woo_product_layout_title_helper', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_woo_product_layout_title_helper', array( 'type' => 'info', 'label' => esc_html__('Product Section - Layout','bellini'), 'section' => 'bellini_frontpage_section_product', 'settings' => 'bellini_woo_product_layout_title_helper', 'priority' => 40, )) ); // Featured Product Slider Layout $wp_customize->add_setting( 'woo_product_new_layout' , array( 'default' => 'layout-1', 'type' => 'option', 'sanitize_callback' => 'esc_attr', 'transport' => 'refresh' ) ); $wp_customize->add_control( 'woo_product_new_layout',array( 'label' => esc_html__( 'Product Layout', 'bellini' ), 'section' => 'bellini_frontpage_section_product', 'settings' => 'woo_product_new_layout', 'priority' => 41, 'type' => 'radio', 'choices' => array( 'layout-1' => esc_html__( 'Layout 1', 'bellini' ), ), ) ); // Product Category Column Layout $wp_customize->add_setting( 'woo_product_new_row', array( 'default' => 'col-sm-3', 'type' => 'option', 'sanitize_callback' => 'esc_attr', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'woo_product_new_row',array( 'label' => esc_html__( 'Display * Products in a row ', 'bellini' ), 'section' => 'bellini_frontpage_section_product', 'settings' => 'woo_product_new_row', 'priority' => 42, 'type' => 'radio', 'choices' => array( 'col-sm-12' => esc_html__( 'One', 'bellini' ), 'col-sm-6' => esc_html__( 'Two', 'bellini' ), 'col-sm-4' => esc_html__( 'Three', 'bellini' ), 'col-sm-3' => esc_html__( 'Four', 'bellini' ), ), ) ); // Product Description Position $wp_customize->add_setting( 'bellini_product_general_des_pos' , array( 'default' => 1, 'type' => 'option', 'sanitize_callback' => 'absint', 'transport' => 'refresh' ) ); $wp_customize->add_control( 'bellini_product_general_des_pos',array( 'label' => esc_html__( 'Product Description Position ', 'bellini' ), 'section' => 'bellini_frontpage_section_product', 'settings' => 'bellini_product_general_des_pos', 'priority' => 43, 'type' => 'radio', 'choices' => array( 1 => esc_html__( 'Top', 'bellini' ), 2 => esc_html__( 'Left', 'bellini' ), 3 => esc_html__( 'Right', 'bellini' ), ), ) ); $wp_customize->add_setting( 'bellini_woo_product_section_title', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_woo_product_section_title', array( 'type' => 'info', 'label' => esc_html__('Product Section - Color & Image','bellini'), 'section' => 'bellini_frontpage_section_product', 'settings' => 'bellini_woo_product_section_title', 'priority' => 50, )) ); // Product Background Color -- Settings $wp_customize->add_setting( 'woo_product_background_color' , array( 'default' => '#eceef1', 'sanitize_callback' => 'sanitize_hex_color', 'type' => 'option', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'woo_product_background_color', array( 'label' => esc_html__( 'Background Color', 'bellini' ), 'section' => 'bellini_frontpage_section_product', 'settings' => 'woo_product_background_color', 'priority' => 51, ) )); /*-------------------------------------------------------------- ## Section: WooCommerce Featured Products --------------------------------------------------------------*/ $wp_customize->add_setting( 'bellini_featured_product_content_title_helper', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_featured_product_content_title_helper', array( 'type' => 'info', 'label' => esc_html__('Featured Products Section - Content','bellini'), 'section' => 'bellini_frontpage_section_featured', 'settings' => 'bellini_featured_product_content_title_helper', 'priority' => 10, )) ); //Product Title $wp_customize->add_setting('woo_featured_product_title', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('woo_featured_product_title',array( 'type' =>'text', 'label' => esc_html__( 'Category Title', 'bellini' ), 'section' => 'bellini_frontpage_section_featured', 'settings' => 'woo_featured_product_title', 'priority' => 11, )); //Product Description $wp_customize->add_setting('woo_featured_product_description', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('woo_featured_product_description',array( 'type' =>'textarea', 'label' => esc_html__( 'Category Description', 'bellini' ), 'section' => 'bellini_frontpage_section_featured', 'settings' => 'woo_featured_product_description', 'priority' => 12, )); // Number of Slides $wp_customize->add_setting( 'bellini_featured_slides_no_selector', array( 'default' => 2, 'type' => 'option', 'sanitize_callback' => 'absint', 'transport' => 'refresh' ) ); $wp_customize->add_control( 'bellini_featured_slides_no_selector',array( 'label' => esc_html__( 'Number of Slides', 'bellini' ), 'section' => 'bellini_frontpage_section_featured', 'settings' => 'bellini_featured_slides_no_selector', 'priority' => 13, 'type' => 'text', 'input_attrs' => array('placeholder' => esc_html__( 'example: 2', 'bellini' ),), ) ); $wp_customize->add_setting( 'bellini_featured_product_layout_title_helper', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_featured_product_layout_title_helper', array( 'type' => 'info', 'label' => esc_html__('Slider Layout','bellini'), 'section' => 'bellini_frontpage_section_featured', 'settings' => 'bellini_featured_product_layout_title_helper', 'priority' => 20, )) ); // Featured Product Slider Layout $wp_customize->add_setting( 'woo_featured_product_layout' , array( 'default' => 'layout-1', 'type' => 'option', 'sanitize_callback' => 'esc_attr', 'transport' => 'refresh' ) ); $wp_customize->add_control( 'woo_featured_product_layout',array( 'label' => esc_html__( 'Slider Layout', 'bellini' ), 'section' => 'bellini_frontpage_section_featured', 'settings' => 'woo_featured_product_layout', 'priority' => 21, 'type' => 'radio', 'choices' => array( 'layout-1' => esc_html__( 'Layout 1', 'bellini' ), ), ) ); $wp_customize->add_setting( 'bellini_featured_product_color_title_helper', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_featured_product_color_title_helper', array( 'type' => 'info', 'label' => esc_html__('Slider Background & Color','bellini'), 'section' => 'bellini_frontpage_section_featured', 'settings' => 'bellini_featured_product_color_title_helper', 'priority' => 30, )) ); // Product Background Color -- Settings $wp_customize->add_setting( 'woo_featured_product_background_color' , array( 'default' => '#eceef1', 'sanitize_callback' => 'sanitize_hex_color', 'type' => 'option', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'woo_featured_product_background_color', array( 'label' => esc_html__( 'Background Color', 'bellini' ), 'section' => 'bellini_frontpage_section_featured', 'settings' => 'woo_featured_product_background_color', 'priority' => 31, ) )); /*-------------------------------------------------------------- ## Section: Homepage Blog Posts --------------------------------------------------------------*/ $wp_customize->add_setting( 'bellini_blog_section_front_content_title_helper', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_blog_section_front_content_title_helper', array( 'type' => 'info', 'label' => esc_html__('Blog Section - Content','bellini'), 'section' => 'bellini_frontpage_section_blog', 'settings' => 'bellini_blog_section_front_content_title_helper', 'priority' => 10, )) ); //Blog Title $wp_customize->add_setting('bellini_home_blogposts_title', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('bellini_home_blogposts_title',array( 'type' =>'text', 'label' => esc_html__( 'Section Title', 'bellini' ), 'section' => 'bellini_frontpage_section_blog', 'settings' => 'bellini_home_blogposts_title', 'priority' => 11, )); //Blog Description $wp_customize->add_setting('bellini_home_blogposts_description', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('bellini_home_blogposts_description',array( 'type' =>'textarea', 'label' => esc_html__( 'Section Description', 'bellini' ), 'section' => 'bellini_frontpage_section_blog', 'settings' => 'bellini_home_blogposts_description', 'priority' => 12, )); $wp_customize->add_setting( 'bellini_blog_section_front_cta_title_helper', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_blog_section_front_cta_title_helper', array( 'type' => 'info', 'label' => esc_html__('Blog Section - Call To Action','bellini'), 'section' => 'bellini_frontpage_section_blog', 'settings' => 'bellini_blog_section_front_cta_title_helper', 'priority' => 20, )) ); //Button Text $wp_customize->add_setting('bellini_home_blogposts_button_text', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('bellini_home_blogposts_button_text',array( 'type' =>'text', 'section' => 'bellini_frontpage_section_blog', 'settings' => 'bellini_home_blogposts_button_text', 'priority' => 21, 'input_attrs' => array('placeholder' => esc_html__( 'Button Text', 'bellini' ),), )); //Button URL $wp_customize->add_setting('bellini_home_blogposts_button_url', array( 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'postMessage', ) ); $wp_customize->add_control('bellini_home_blogposts_button_url',array( 'type' =>'url', 'section' => 'bellini_frontpage_section_blog', 'settings' => 'bellini_home_blogposts_button_url', 'priority' => 22, 'input_attrs' => array('placeholder' => esc_html__( 'Button Link', 'bellini' ),), )); $wp_customize->add_setting( 'bellini_blog_section_front_layout_title_helper', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_blog_section_front_layout_title_helper', array( 'type' => 'info', 'label' => esc_html__('Blog Posts Layout','bellini'), 'section' => 'bellini_frontpage_section_blog', 'settings' => 'bellini_blog_section_front_layout_title_helper', 'priority' => 30, )) ); // Front Blog Posts layout $wp_customize->add_setting( 'bellini_home_blogposts_layout' , array( 'default' => 'layout-1', 'type' => 'option', 'sanitize_callback' => 'esc_attr', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'bellini_home_blogposts_layout',array( 'label' => esc_html__( 'Blog Posts Layout', 'bellini' ), 'section' => 'bellini_frontpage_section_blog', 'settings' => 'bellini_home_blogposts_layout', 'priority' => 31, 'type' => 'radio', 'choices' => array( 'layout-1' => esc_html__( 'Layout 1', 'bellini' ), 'layout-5' => esc_html__( 'Layout 5', 'bellini' ), ), ) ); $wp_customize->add_setting( 'bellini_blog_section_front_color_title_helper', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_blog_section_front_color_title_helper', array( 'type' => 'info', 'label' => esc_html__('Section - Color & Image','bellini'), 'section' => 'bellini_frontpage_section_blog', 'settings' => 'bellini_blog_section_front_color_title_helper', 'priority' => 40, )) ); // Blog Section background Color $wp_customize->add_setting( 'bellini_blogposts_background_color' , array( 'default' => '#eceef1', 'sanitize_callback' => 'sanitize_hex_color', 'type' => 'option', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'bellini_blogposts_background_color', array( 'label' => esc_html__( 'Background Color', 'bellini' ), 'section' => 'bellini_frontpage_section_blog', 'settings' => 'bellini_blogposts_background_color', 'priority' => 41, ) )); /*-------------------------------------------------------------- ## Section: Feature Blocks --------------------------------------------------------------*/ // Blocks Title $wp_customize->add_setting( 'bellini_feature_blocks_section_title', array( 'sanitize_callback' => 'sanitize_key', 'type' => 'option', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_feature_blocks_section_title', array( 'type' => 'info', 'label' => esc_html__( 'Block Section Options','bellini'), 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_blocks_section_title', 'priority' => 20, )) ); // Block Layout $wp_customize->add_setting( 'bellini_feature_block_layout' , array( 'default' => 'layout-1', 'type' => 'option', 'sanitize_callback' => 'esc_attr', 'transport' => 'refresh' ) ); $wp_customize->add_control( 'bellini_feature_block_layout',array( 'label' => esc_html__( 'Block Layout', 'bellini' ), 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_block_layout', 'priority' => 21, 'type' => 'radio', 'choices' => array( 'layout-1' => esc_html__( 'Layout 1', 'bellini' ), 'layout-3' => esc_html__( 'Layout 3', 'bellini' ), ), ) ); // Feature Blocks Column Layout $wp_customize->add_setting( 'bellini_feature_block_row' , array( 'default' => 'col-sm-4', 'type' => 'option', 'sanitize_callback' => 'esc_attr', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'bellini_feature_block_row',array( 'label' => esc_html__( 'Display * Blocks in a row ', 'bellini' ), 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_block_row', 'priority' => 22, 'type' => 'radio', 'choices' => array( 'col-sm-12' => esc_html__( 'One', 'bellini' ), 'col-sm-6' => esc_html__( 'Two', 'bellini' ), 'col-sm-4' => esc_html__( 'Three', 'bellini' ), ), ) ); // Category Background Color -- Settings $wp_customize->add_setting( 'bellini_feature_block_background_color' , array( 'default' => '#FFEB3B', 'sanitize_callback' => 'sanitize_hex_color', 'type' => 'option', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'bellini_feature_block_background_color', array( 'label' => esc_html__( 'Background Color', 'bellini' ), 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_block_background_color', 'priority' => 23, ) )); // Features Blocks Title $wp_customize->add_setting( 'bellini_feature_blocks_content_title', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_feature_blocks_content_title', array( 'type' => 'info', 'label' => esc_html__('Block Content','bellini'), 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_blocks_content_title', 'priority' => 1, )) ); //Blocks Section Title $wp_customize->add_setting('bellini_feature_blocks_title', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('bellini_feature_blocks_title',array( 'type' =>'text', 'label' => esc_html__( 'Block Section Title', 'bellini' ), 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_blocks_title', 'priority' => 2, )); // Features Blocks One Helper Title $wp_customize->add_setting( 'bellii_feature_block_one_helper_title', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellii_feature_block_one_helper_title', array( 'type' => 'info', 'label' => esc_html__('Block One','bellini'), 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellii_feature_block_one_helper_title', 'priority' => 3, )) ); //Block 1 Section Title $wp_customize->add_setting('bellini_feature_block_title_one', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('bellini_feature_block_title_one',array( 'type' =>'text', 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_block_title_one', 'input_attrs' => array('placeholder' => esc_html__( 'Title', 'bellini' ),), 'priority' => 4, )); //Block 1 Content $wp_customize->add_setting('bellini_feature_block_content_one', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'postMessage', ) ); $wp_customize->add_control('bellini_feature_block_content_one',array( 'type' =>'textarea', 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_block_content_one', 'priority' => 5, )); //Block 1 Image $wp_customize->add_setting('bellini_feature_block_image_one', array( 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'bellini_feature_block_image_one',array( 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_block_image_one', 'priority' => 6, ) )); // Features Blocks Two Helper Title $wp_customize->add_setting( 'bellii_feature_block_two_helper_title', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellii_feature_block_two_helper_title', array( 'type' => 'info', 'label' => esc_html__('Block Two','bellini'), 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellii_feature_block_two_helper_title', 'priority' => 7, )) ); //Block 2 Section Title $wp_customize->add_setting('bellini_feature_block_title_two', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('bellini_feature_block_title_two',array( 'type' =>'text', 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_block_title_two', 'input_attrs' => array('placeholder' => esc_html__( 'Title', 'bellini' ),), 'priority' => 8, )); //Block 2 Content $wp_customize->add_setting('bellini_feature_block_content_two', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('bellini_feature_block_content_two',array( 'type' =>'textarea', 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_block_content_two', 'priority' => 9, )); //Block 2 Image $wp_customize->add_setting('bellini_feature_block_image_two', array( 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'bellini_feature_block_image_two',array( 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_block_image_two', 'priority' => 10, ) )); // Features Blocks Three Helper Title $wp_customize->add_setting( 'bellii_feature_block_three_helper_title', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellii_feature_block_three_helper_title', array( 'type' => 'info', 'label' => esc_html__('Block Three','bellini'), 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellii_feature_block_three_helper_title', 'priority' => 11, )) ); //Block 3 Section Title $wp_customize->add_setting('bellini_feature_block_title_three', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('bellini_feature_block_title_three',array( 'type' =>'text', 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_block_title_three', 'input_attrs' => array('placeholder' => esc_html__( 'Title', 'bellini' ),), 'priority' => 12, )); //Block 3 Content $wp_customize->add_setting('bellini_feature_block_content_three', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('bellini_feature_block_content_three',array( 'type' =>'textarea', 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_block_content_three', 'priority' => 13, )); //Block 3 Image $wp_customize->add_setting('bellini_feature_block_image_three', array( 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'bellini_feature_block_image_three',array( 'section' => 'bellini_frontpage_section_blocks', 'settings' => 'bellini_feature_block_image_three', 'priority' => 14, ) )); /*-------------------------------------------------------------- ## Section: Text Field --------------------------------------------------------------*/ //Text Field $wp_customize->add_setting('bellini_frontpage_textarea_section_field', array( 'type' => 'option', 'sanitize_callback' => 'bellini_sanitize_input', 'transport' => 'refresh', ) ); $wp_customize->add_control('bellini_frontpage_textarea_section_field',array( 'type' =>'textarea', 'label' => esc_html__( 'Text Field', 'bellini' ), 'section' => 'bellini_frontpage_section_text_field', 'settings' => 'bellini_frontpage_textarea_section_field', 'priority' => 1, )); $wp_customize->add_setting( 'bellini_frontpage_textarea_section_helper', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_frontpage_textarea_section_helper', array( 'type' => 'info', 'label' => esc_html__('Section - Color & Image','bellini'), 'section' => 'bellini_frontpage_section_text_field', 'settings' => 'bellini_frontpage_textarea_section_helper', 'priority' => 2, )) ); // Text Field Background Color $wp_customize->add_setting( 'bellini_frontpage_textarea_section_color' , array( 'default' => '#eceef1', 'sanitize_callback' => 'sanitize_hex_color', 'type' => 'option', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'bellini_frontpage_textarea_section_color', array( 'label' => esc_html__( 'Background Color', 'bellini' ), 'section' => 'bellini_frontpage_section_text_field', 'settings' => 'bellini_frontpage_textarea_section_color', 'priority' => 3, ) )); //Text Field Background Image $wp_customize->add_setting('bellini_frontpage_textarea_section_image', array( 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize,'bellini_frontpage_textarea_section_image',array( 'section' => 'bellini_frontpage_section_text_field', 'settings' => 'bellini_frontpage_textarea_section_image', 'priority' => 4, ) )); /*-------------------------------------------------------------- ## Section Re-order --------------------------------------------------------------*/ $frontpage_reorder_description = sprintf( __( 'You will need to have Homepage Control plugin installed to re-order frontpage elements.
After installation go to Appearance -> Homepage Control', 'bellini' ), esc_url( 'https://wordpress.org/plugins/homepage-control/' )); $wp_customize->add_setting( 'bellini_frontpage_reorder_helper_documentation', array( 'type' => 'option', 'sanitize_callback' => 'sanitize_key', ) ); $wp_customize->add_control( new Bellini_UI_Helper_Title ( $wp_customize, 'bellini_frontpage_reorder_helper_documentation', array( 'type' => 'info', 'label' => esc_html__('How To Re-order','bellini'), 'description' => $frontpage_reorder_description, 'section' => 'bellini_frontpage_section_reorder', 'settings' => 'bellini_frontpage_reorder_helper_documentation', 'priority' => 100, )) );