add_section( 'home_page_shop_option', array( 'title' => __('Shop Section Options', 'avenews'), 'panel' => 'theme_home_option_panel', ) ); /* Home Page Layout */ $wp_customize->add_setting( 'avenews_options[enable_shop_section]', array( 'default' => $default_options['enable_shop_section'], 'sanitize_callback' => 'avenews_sanitize_checkbox', ) ); $wp_customize->add_control( 'avenews_options[enable_shop_section]', array( 'label' => __('Enable Shop Section', 'avenews'), 'section' => 'home_page_shop_option', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'avenews_options[shop_post_title]', array( 'default' => $default_options['shop_post_title'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'avenews_options[shop_post_title]', array( 'label' => __('Shop Post Title', 'avenews'), 'section' => 'home_page_shop_option', 'type' => 'text', ) ); $wp_customize->add_setting( 'avenews_options[shop_post_description]', array( 'default' => $default_options['shop_post_description'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'avenews_options[shop_post_description]', array( 'label' => __('Shop Post Description', 'avenews'), 'section' => 'home_page_shop_option', 'type' => 'textarea', ) ); $wp_customize->add_setting( 'avenews_options[shop_select_product_from]', array( 'default' => $default_options['shop_select_product_from'], 'sanitize_callback' => 'avenews_sanitize_select', ) ); $wp_customize->add_control( 'avenews_options[shop_select_product_from]', array( 'label' => __('Select Product From', 'avenews'), 'section' => 'home_page_shop_option', 'type' => 'select', 'choices' => array( 'custom' => __('Custom Select', 'avenews'), 'recent-products' => __('Recent Products', 'avenews'), 'popular-products' => __('Popular Products', 'avenews'), 'sale-products' => __('Sale Products', 'avenews'), ) ) ); $wp_customize->add_setting( 'avenews_options[select_product_category]', array( 'default' => $default_options['select_product_category'], 'sanitize_callback' => 'avenews_sanitize_select', ) ); $wp_customize->add_control( 'avenews_options[select_product_category]', array( 'label' => __('Select Product Category', 'avenews'), 'section' => 'home_page_shop_option', 'type' => 'select', 'choices' => avenews_woocommerce_product_cat(), 'active_callback' => 'avenews_shop_select_product_from' ) ); $wp_customize->add_setting( 'avenews_options[shop_number_of_column]', array( 'default' => $default_options['shop_number_of_column'], 'sanitize_callback' => 'avenews_sanitize_select', ) ); $wp_customize->add_control( 'avenews_options[shop_number_of_column]', array( 'label' => __('Select Number Of Column', 'avenews'), 'section' => 'home_page_shop_option', 'type' => 'select', 'choices' => array( '2' => __('2', 'avenews'), '3' => __('3', 'avenews'), '4' => __('4', 'avenews'), ) ) ); $wp_customize->add_setting( 'avenews_options[shop_number_of_product]', array( 'default' => $default_options['shop_number_of_product'], 'sanitize_callback' => 'avenews_sanitize_select', ) ); $wp_customize->add_control( 'avenews_options[shop_number_of_product]', array( 'label' => __('Select Number Of Product', 'avenews'), 'section' => 'home_page_shop_option', 'type' => 'select', 'choices' => array( '2' => __('2', 'avenews'), '3' => __('3', 'avenews'), '4' => __('4', 'avenews'), '5' => __('5', 'avenews'), '6' => __('6', 'avenews'), '7' => __('7', 'avenews'), '8' => __('8', 'avenews'), '9' => __('9', 'avenews'), '10' => __('10', 'avenews'), '11' => __('11', 'avenews'), '12' => __('12', 'avenews'), ) ) ); $wp_customize->add_setting( 'avenews_options[shop_post_button_text]', array( 'default' => $default_options['shop_post_button_text'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'avenews_options[shop_post_button_text]', array( 'label' => __('Shop section Button Text', 'avenews'), 'section' => 'home_page_shop_option', 'type' => 'text', ) ); $wp_customize->add_setting( 'avenews_options[shop_post_button_url]', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'avenews_options[shop_post_button_url]', array( 'label' => __('Button Link', 'avenews'), 'section' => 'home_page_shop_option', 'type' => 'text', 'description' => __('Leave empty if you don\'t want the image to have a link', 'avenews'), ) );