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

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

96 lines 2.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /* About section */
3 $wp_customize->add_section( 'about_section' , array(
4 'title' => __('About settings', 'spicebox'),
5 'panel' => 'section_settings',
6 'priority' => 3,
7 ) );
8
9
10 // Enable service more btn
11 $wp_customize->add_setting( 'home_about_section_enabled' , array( 'default' => 'on') );
12 $wp_customize->add_control( 'home_about_section_enabled' , array(
13 'label' => __( 'Enable About on homepage', 'spicebox' ),
14 'section' => 'about_section',
15 'type' => 'radio',
16 'choices' => array(
17 'on'=>__('ON', 'spicebox'),
18 'off'=>__('OFF', 'spicebox')
19 )
20 ));
21
22 //About section content
23 if ( class_exists( 'Innofit_Page_Editor' ) ) {
24 $about_image = SPICEB_PLUGIN_URL.'inc/innofit/images/about/about.jpg';
25 $default = __(' <div class="row v-center">
26 <div class="col-md-5 col-sm-5 col-xs-12">
27 <figure class="about-thumbnail mbottom-50">
28 <img src="'.$about_image.'" alt="About">
29 </figure>
30 </div>
31
32 <div class="col-md-7 col-sm-7 col-xs-12">
33 <div class="about-content mbottom-50">
34 <h6 class="entry-subtitle">Welcome to <span class="text-default">Innofit</span></h6>
35 <h1 class="entry-title">We have the right solutions</h1>
36 <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totame rems aperiam, eaque ipsa quae ab illo inventore veritatis quasi architecto beatae vitaes dicta sunt explicabo. Nemo enim ipsam voluptatem.</p>
37 <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.</p>
38 <div class="ptop-15"><a href="#" class="btn-ex-small btn-border">Our Story</a></div>
39 </div>
40 </div>
41 </div>
42 ','spicebox');
43 $wp_customize->add_setting(
44 'about_section_content', array(
45 'default' => $default,
46 'sanitize_callback' => 'wp_kses_post',
47 'transport' => $selective_refresh,
48 )
49 );
50
51 $wp_customize->add_control(
52 new Innofit_Page_Editor(
53 $wp_customize, 'about_section_content', array(
54 'label' => esc_html__( 'About content', 'spicebox' ),
55 'section' => 'about_section',
56 'priority' => 10,
57 'needsync' => true,
58 )
59 )
60 );
61 }
62
63
64 //About image
65 $wp_customize->add_setting( 'innofit_about_section_background',array('default' => ''));
66
67
68 $wp_customize->add_control(
69 new WP_Customize_Image_Control(
70 $wp_customize,
71 'innofit_about_section_background',
72 array(
73 'label' => __('Image','spasalon'),
74 'settings' =>'innofit_about_section_background',
75 'section' => 'about_section',
76 'type' => 'upload',
77 )
78 )
79 );
80
81
82 /**
83 * Add selective refresh for Front page about section controls.
84 */
85
86
87 $wp_customize->selective_refresh->add_partial( 'about_section_content', array(
88 'selector' => '.about .entry-subtitle',
89 'settings' => 'about_section_content',
90
91 ) );
92
93
94
95
96 ?>