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 / team-section.php

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

90 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 //Team Section
3 $wp_customize->add_section('innofit_team_section',array(
4 'title' => __('Team settings','spicebox'),
5 'panel' => 'section_settings',
6 'priority' => 8,
7 ));
8
9 $wp_customize->add_setting( 'team_section_enable' , array( 'default' => 'on') );
10 $wp_customize->add_control( 'team_section_enable' , array(
11 'label' => __( 'Enable Home Team section', 'spicebox' ),
12 'section' => 'innofit_team_section',
13 'type' => 'radio',
14 'choices' => array(
15 'on'=>__('ON', 'spicebox'),
16 'off'=>__('OFF', 'spicebox')
17 )
18 ));
19
20 // Team section title
21 $wp_customize->add_setting( 'home_team_section_title',array(
22 'default' => __('Meet our superheroes','spicebox'),
23 'sanitize_callback' => 'innofit_home_page_sanitize_text',
24 'transport' => $selective_refresh,
25 ));
26 $wp_customize->add_control( 'home_team_section_title',array(
27 'label' => __('Title','spicebox'),
28 'section' => 'innofit_team_section',
29 'type' => 'text',
30 ));
31
32 //Team section discription
33 $wp_customize->add_setting( 'home_team_section_discription',array(
34 'default'=> __('The best team available','spicebox'),
35 'transport' => $selective_refresh,
36 ));
37 $wp_customize->add_control( 'home_team_section_discription',array(
38 'label' => __('Description','spicebox'),
39 'section' => 'innofit_team_section',
40 'type' => 'textarea',
41 ));
42
43
44 if ( class_exists( 'Innofit_Repeater' ) ) {
45 $wp_customize->add_setting(
46 'innofit_team_content', array(
47 )
48 );
49
50 $wp_customize->add_control(
51 new Innofit_Repeater(
52 $wp_customize, 'innofit_team_content', array(
53 'label' => esc_html__( 'Team content', 'spicebox' ),
54 'section' => 'innofit_team_section',
55 'priority' => 15,
56 'add_field_label' => esc_html__( 'Add new Team Member', 'spicebox' ),
57 'item_name' => esc_html__( 'Team Member', 'spicebox' ),
58 'customizer_repeater_image_control' => true,
59 'customizer_repeater_title_control' => true,
60 'customizer_repeater_subtitle_control' => true,
61 'customizer_repeater_link_control' => true,
62 'customizer_repeater_checkbox_control' => true,
63 'customizer_repeater_repeater_control' => true,
64
65 )
66 )
67 );
68 }
69
70
71 /**
72 * Add selective refresh for Front page team section controls.
73 */
74
75
76 $wp_customize->selective_refresh->add_partial( 'home_team_section_title', array(
77 'selector' => '.team-members .section-subtitle',
78 'settings' => 'home_team_section_title',
79 'render_callback' => 'home_team_section_title_render_callback',
80
81 ) );
82
83 $wp_customize->selective_refresh->add_partial( 'home_team_section_discription', array(
84 'selector' => '.team-members .section-title',
85 'settings' => 'home_team_section_discription',
86 'render_callback' => 'home_team_section_discription_render_callback',
87
88 ) );
89
90 ?>