PluginProbe
SpiceBox / 0.3.5
SpiceBox v0.3.5
trunk 0.2.2 0.2.3 0.2.4 0.2.5 0.2.6 0.2.7 0.2.8 0.2.9 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.3.5 0.3.6 0.3.7 0.3.8 0.3.9.1 0.3.9.2 0.4 0.5 0.6 0.7 1.0 All 76 releases
spicebox / inc / innofit / customizer / wooproduct-section.php

wooproduct-section.php in SpiceBox 0.3.5, at inc/innofit/customizer/wooproduct-section.php

62 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 $wp_customize->add_section('innofit_shop_section',array(
3 'title' => __('Home Shop settings','spicebox'),
4 'panel' => 'section_settings',
5 'priority' => 5,
6 ));
7
8 $wp_customize->add_setting( 'shop_section_enable' , array( 'default' => 'on') );
9 $wp_customize->add_control( 'shop_section_enable' , array(
10 'label' => __( 'Enable Home Shop section', 'spicebox' ),
11 'section' => 'innofit_shop_section',
12 'type' => 'radio',
13 'choices' => array(
14 'on'=>__('ON', 'spicebox'),
15 'off'=>__('OFF', 'spicebox')
16 )
17 ));
18
19 // Shop section title
20 $wp_customize->add_setting( 'home_shop_section_title',array(
21 'default' => __('Featured Products','spicebox'),
22 'sanitize_callback' => 'innofit_home_page_sanitize_text',
23 'transport' => $selective_refresh,
24 ));
25 $wp_customize->add_control( 'home_shop_section_title',array(
26 'label' => __('Title','spicebox'),
27 'section' => 'innofit_shop_section',
28 'type' => 'text',
29 ));
30
31 //Shop section discription
32 $wp_customize->add_setting( 'home_shop_section_discription',array(
33 'default'=> __('Our amazing products','spicebox'),
34 'transport' => $selective_refresh,
35 ));
36 $wp_customize->add_control( 'home_shop_section_discription',array(
37 'label' => __('Description','spicebox'),
38 'section' => 'innofit_shop_section',
39 'type' => 'textarea',
40 ));
41
42
43 /**
44 * Add selective refresh for Front page shop section controls.
45 */
46
47
48 $wp_customize->selective_refresh->add_partial( 'home_shop_section_title', array(
49 'selector' => '.shop .section-subtitle',
50 'settings' => 'home_shop_section_title',
51 'render_callback' => 'home_shop_section_title_render_callback',
52
53 ) );
54
55 $wp_customize->selective_refresh->add_partial( 'home_shop_section_discription', array(
56 'selector' => '.shop .section-title',
57 'settings' => 'home_shop_section_discription',
58 'render_callback' => 'home_shop_section_discription_render_callback',
59
60 ) );
61
62 ?>