Clever Fox - Version 1.1.9

Version Description

  • Added More Slides
  • Removed Unnecessary Images
Download this release

Release Info

Developer nayrathemes
Plugin Icon 128x128 Clever Fox
Version 1.1.9
Comparing to
See all releases

Code changes from version 1.1.8 to 1.1.9

clever-fox.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Clever Fox
4
  Plugin URI:
5
  Description: The Clever Fox plugin adds sections functionality to the Startkit theme and Others Nayra's Themes. This plugin for only startkit themes. Clever Fox is a plugin build to enhance the functionality of WordPress Theme made by Nayra Themes.
6
- Version: 1.1.8
7
  Author: nayrathemes
8
  Author URI: https://nayrathemes.com
9
  Text Domain: clever-fox
3
  Plugin Name: Clever Fox
4
  Plugin URI:
5
  Description: The Clever Fox plugin adds sections functionality to the Startkit theme and Others Nayra's Themes. This plugin for only startkit themes. Clever Fox is a plugin build to enhance the functionality of WordPress Theme made by Nayra Themes.
6
+ Version: 1.1.9
7
  Author: nayrathemes
8
  Author URI: https://nayrathemes.com
9
  Text Domain: clever-fox
inc/startkit/features/navigation.php CHANGED
@@ -1,4 +1,48 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  // Customizer tabs for header social media & address
3
 
4
  function startkit_lite_social_customize_register( $wp_customize ) {
1
  <?php
2
+ // Customizer tabs for slider section
3
+ if ( ! function_exists( 'startkit_slider_manager_customize_register' ) ) :
4
+ function startkit_slider_manager_customize_register( $wp_customize ) {
5
+ if ( class_exists( 'Cleverfox_Customize_Control_Tabs' ) ) {
6
+
7
+ // Pricing Tables Tabs
8
+ $wp_customize->add_setting(
9
+ 'startkit_slider_tabs', array(
10
+ 'sanitize_callback' => 'sanitize_text_field',
11
+ )
12
+ );
13
+
14
+ $wp_customize->add_control(
15
+ new Cleverfox_Customize_Control_Tabs(
16
+ $wp_customize, 'startkit_slider_tabs', array(
17
+ 'section' => 'slider_setting',
18
+ 'tabs' => array(
19
+ 'general' => array(
20
+ 'nicename' => esc_html__( 'setting', 'startkit' ),
21
+ 'icon' => 'cogs',
22
+ 'controls' => array(
23
+ 'hide_show_slider',
24
+
25
+ ),
26
+ ),
27
+ 'Content' => array(
28
+ 'nicename' => esc_html__( 'Default', 'startkit' ),
29
+ 'icon' => 'table',
30
+ 'controls' => array(
31
+ 'slider',
32
+ 'startkit_slider_upgrade_to_pro',
33
+ 'slider_opacity',
34
+ ),
35
+ ),
36
+ ),
37
+
38
+ )
39
+ )
40
+ );
41
+ }
42
+ }
43
+ add_action( 'customize_register', 'startkit_slider_manager_customize_register' );
44
+ endif;
45
+
46
  // Customizer tabs for header social media & address
47
 
48
  function startkit_lite_social_customize_register( $wp_customize ) {
inc/startkit/features/section-service.php CHANGED
@@ -140,7 +140,7 @@ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' :
140
 
141
 
142
  }
143
- //Pro feature
144
  class Startkit_services__section_upgrade extends WP_Customize_Control {
145
  public function render_content() { ?>
146
  <a class="customizer_service_upgrade_section up-to-pro" href="https://www.nayrathemes.com/startkit-pro/" target="_blank" style="display: none;"><?php _e('Upgrade to Pro','startkit'); ?></a>
140
 
141
 
142
  }
143
+ //Pro feature
144
  class Startkit_services__section_upgrade extends WP_Customize_Control {
145
  public function render_content() { ?>
146
  <a class="customizer_service_upgrade_section up-to-pro" href="https://www.nayrathemes.com/startkit-pro/" target="_blank" style="display: none;"><?php _e('Upgrade to Pro','startkit'); ?></a>
inc/startkit/features/section-slider.php CHANGED
@@ -32,109 +32,85 @@ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' :
32
  )
33
  ));
34
  }
35
- // Background Image //
36
- $wp_customize->add_setting(
37
- 'slide_image' ,
38
- array(
39
- 'default' => CLEVERFOX_PLUGIN_URL .'inc/startkit/images/slider/slider.jpg',
40
- 'capability' => 'edit_theme_options',
41
- 'sanitize_callback' => 'startkit_sanitize_url',
42
-
43
- )
44
- );
45
-
46
- $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize , 'slide_image' ,
47
- array(
48
- 'label' => __( 'Background Image', 'startkit' ),
49
- 'section' => 'slider_setting',
50
- 'settings' => 'slide_image',
51
- )
52
- ));
53
- //slide title//
54
-
55
- $wp_customize->add_setting(
56
- 'slide_title',
57
- array(
58
- 'default' => __('Strengths of Successful Businesses','startkit'),
59
- 'capability' => 'edit_theme_options',
60
- 'sanitize_callback' => 'startkit_sanitize_html',
61
- 'transport' => $selective_refresh,
62
- )
63
- );
64
-
65
- $wp_customize->add_control(
66
- 'slide_title',
67
- array(
68
- 'label' => __('Title','startkit'),
69
- 'section' => 'slider_setting',
70
- 'settings' => 'slide_title',
71
- 'type' => 'text',
72
- )
73
- );
74
- //slide description//
75
- $wp_customize->add_setting(
76
- 'slide_description',
77
- array(
78
- 'default' => __('Randomised words which dont look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isnt anembarrassing hidden in the middle of text.'),
79
- 'capability' => 'edit_theme_options',
80
- 'sanitize_callback' => 'startkit_sanitize_html',
81
- 'transport' => $selective_refresh,
82
- )
83
- );
84
-
85
- $wp_customize->add_control(
86
- 'slide_description',
87
- array(
88
- 'label' => __('Description','startkit'),
89
- 'section' => 'slider_setting',
90
- 'settings' => 'slide_description',
91
- 'type' => 'textarea',
92
- )
93
- );
94
- // button text
95
- $wp_customize->add_setting(
96
- 'slide_btn_text',
97
- array(
98
- 'default' => __('Explore More','startkit'),
99
- 'capability' => 'edit_theme_options',
100
- 'sanitize_callback' => 'startkit_sanitize_html',
101
- 'transport' => $selective_refresh,
102
- )
103
- );
104
-
105
- $wp_customize->add_control(
106
- 'slide_btn_text',
107
- array(
108
- 'label' => __('button text','startkit'),
109
- 'section' => 'slider_setting',
110
- 'settings' => 'slide_btn_text',
111
- 'type' => 'text',
112
- )
113
- );
114
-
115
- // Slider button link
116
- $wp_customize->add_setting(
117
- 'slide_btn_link',
118
- array(
119
- 'default' => __('#','startkit'),
120
- 'capability' => 'edit_theme_options',
121
- 'sanitize_callback' => 'startkit_sanitize_url',
122
- 'transport' => $selective_refresh,
123
- )
124
- );
125
-
126
- $wp_customize->add_control(
127
- 'slide_btn_link',
128
- array(
129
- 'label' => __('Link','startkit'),
130
- 'section' => 'slider_setting',
131
- 'settings' => 'slide_btn_link',
132
- 'type' => 'text',
133
- )
134
- );
135
  //slider opacity
136
-
137
- // Slider Text Caption //
138
  $wp_customize->add_setting(
139
  'slider_opacity' ,
140
  array(
@@ -142,6 +118,7 @@ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' :
142
  'capability' => 'edit_theme_options',
143
  )
144
  );
 
145
  $wp_customize->add_control(
146
  new Cleverfox_Customizer_Range_Slider_Control( $wp_customize, 'slider_opacity',
147
  array(
@@ -159,47 +136,4 @@ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' :
159
  }
160
  add_action( 'customize_register', 'startkit_slider_setting' );
161
  endif;
162
- // slider selective refresh
163
- function startkit_home_slider_section_partials( $wp_customize ){
164
-
165
-
166
- // slider title
167
- $wp_customize->selective_refresh->add_partial( 'slide_title', array(
168
- 'selector' => '#lite-slite .header-slider h1 ',
169
- 'settings' => 'slide_title',
170
- 'render_callback' => 'home_section_slider_tit_render_callback',
171
-
172
- ) );
173
-
174
- // slider title
175
- $wp_customize->selective_refresh->add_partial( 'slide_description', array(
176
- 'selector' => '#lite-slite .header-slider p',
177
- 'settings' => 'slide_description',
178
- 'render_callback' => 'home_section_slider_desc_render_callback',
179
-
180
- ) );
181
- // slider button
182
- $wp_customize->selective_refresh->add_partial( 'slide_btn_text', array(
183
- 'selector' => '#lite-slite .header-slider a',
184
- 'settings' => 'slide_btn_text',
185
- 'render_callback' => 'home_section_slider_button_render_callback',
186
-
187
- ) );
188
-
189
- }
190
- add_action( 'customize_register', 'startkit_home_slider_section_partials' );
191
-
192
- // social icons
193
- function home_section_slider_tit_render_callback() {
194
- return get_theme_mod( 'slide_title' );
195
- }
196
- //slide desc
197
- function home_section_slider_desc_render_callback() {
198
- return get_theme_mod( 'slide_description' );
199
- }
200
-
201
- //slide desc
202
- function home_section_slider_button_render_callback() {
203
- return get_theme_mod( 'slide_btn_text' );
204
- }
205
  ?>
32
  )
33
  ));
34
  }
35
+ /**
36
+ * Customizer Repeater for add slides
37
+ */
38
+ if ( class_exists( 'Startkit_Repeater' ) ) {
39
+ $wp_customize->add_setting( 'slider',
40
+ array(
41
+ 'sanitize_callback' => 'startkit_repeater_sanitize',
42
+ 'default' => json_encode(
43
+ array(
44
+ array(
45
+ "image_url" => CLEVERFOX_PLUGIN_URL .'inc/startkit/images/slider/slider01.jpg' ,
46
+ "link" => "#", "title" => "Strengths of Successful Businesses",
47
+ "text" => "Randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anembarrassing hidden in the middle of text.",
48
+ "text2" => "Explore More",
49
+ "id" => "customizer_repeater_00070" ),
50
+
51
+ array("image_url" => CLEVERFOX_PLUGIN_URL .'inc/startkit/images/slider/slider02.jpg',
52
+ "link" => "#", "title" => "Strengths of Successful Businesses",
53
+ "text" => "Randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anembarrassing hidden in the middle of text.",
54
+ "text2" => "Explore More",
55
+ "id" => "customizer_repeater_00071" ),
56
+
57
+ array(
58
+ "image_url" => CLEVERFOX_PLUGIN_URL .'inc/startkit/images/slider/slider03.jpg',
59
+ "link" => "#",
60
+ "title" => "Strengths of Successful Businesses",
61
+ "text" => "Randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anembarrassing hidden in the middle of text.",
62
+ "text2" => "Explore More",
63
+ "id" => "customizer_repeater_00072" ),
64
+ )
65
+ )
66
+ )
67
+ );
68
+
69
+ $wp_customize->add_control(
70
+ new Startkit_Repeater( $wp_customize,
71
+ 'slider',
72
+ array(
73
+ 'label' => esc_html__('Slide','startkit'),
74
+ 'section' => 'slider_setting',
75
+ 'add_field_label' => esc_html__( 'Add New Slider', 'startkit' ),
76
+ 'item_name' => esc_html__( 'Slider', 'startkit' ),
77
+ 'priority' => 2,
78
+
79
+ 'customizer_repeater_title_control' => true,
80
+ 'customizer_repeater_text_control' => true,
81
+ 'customizer_repeater_text2_control'=> true,
82
+ 'customizer_repeater_link_control' => true,
83
+ 'customizer_repeater_slide_align' => true,
84
+ 'customizer_repeater_image_control' => true,
85
+ )
86
+ )
87
+ );
88
+ }
89
+
90
+ //Pro feature
91
+ class Startkit_slider__section_upgrade extends WP_Customize_Control {
92
+ public function render_content() { ?>
93
+ <a class="customizer_slider_upgrade_section up-to-pro" href="https://www.nayrathemes.com/startkit-pro/" target="_blank" style="display: none;"><?php _e('Upgrade to Pro','startkit'); ?></a>
94
+ <?php
95
+ }
96
+ }
97
+
98
+
99
+ $wp_customize->add_setting( 'startkit_slider_upgrade_to_pro', array(
100
+ 'capability' => 'edit_theme_options',
101
+ 'sanitize_callback' => 'wp_filter_nohtml_kses',
102
+ ));
103
+ $wp_customize->add_control(
104
+ new Startkit_slider__section_upgrade(
105
+ $wp_customize,
106
+ 'startkit_slider_upgrade_to_pro',
107
+ array(
108
+ 'section' => 'slider_setting',
109
+ 'settings' => 'startkit_slider_upgrade_to_pro',
110
+ )
111
+ )
112
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  //slider opacity
 
 
114
  $wp_customize->add_setting(
115
  'slider_opacity' ,
116
  array(
118
  'capability' => 'edit_theme_options',
119
  )
120
  );
121
+
122
  $wp_customize->add_control(
123
  new Cleverfox_Customizer_Range_Slider_Control( $wp_customize, 'slider_opacity',
124
  array(
136
  }
137
  add_action( 'customize_register', 'startkit_slider_setting' );
138
  endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  ?>
inc/startkit/images/about/play-icon.png DELETED
Binary file
inc/startkit/images/about/video-bg.jpg DELETED
Binary file
inc/startkit/images/slider/slider.jpg DELETED
Binary file
inc/startkit/images/slider/slider01.jpg ADDED
Binary file
inc/startkit/images/slider/slider02.jpg ADDED
Binary file
inc/startkit/images/slider/slider03.jpg ADDED
Binary file
inc/startkit/sections/section-slider.php CHANGED
@@ -6,12 +6,39 @@ if ( ! function_exists( 'start_startkit_slider' ) ) :
6
 
7
  function start_startkit_slider() {
8
 
9
- $slide_image = get_theme_mod('slide_image',CLEVERFOX_PLUGIN_URL .'inc/startkit/images/slider/slider.jpg');
10
- $slide_title = get_theme_mod('slide_title','Strengths of Successful Businesses');
11
-
12
- $slide_description = get_theme_mod('slide_description','Randomised words which dont look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isnt anembarrassing hidden in the middle of text.');
13
- $slide_btn_text = get_theme_mod('slide_btn_text','Explore More');
14
- $slide_btn_link = get_theme_mod('slide_btn_link',esc_url('#'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  $slider_opacity = get_theme_mod('slider_opacity','0.3');
16
  $hide_show_slider = get_theme_mod('hide_show_slider','1');
17
 
@@ -20,20 +47,44 @@ if ( ! function_exists( 'start_startkit_slider' ) ) :
20
  <div class="row" id="lite-slite">
21
  <div class="col-md-12">
22
  <div class="header-slider">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  <div class="header-single-slider">
24
- <figure>
25
- <img src="<?php echo esc_url( $slide_image ); ?>" alt="">
 
 
26
  <figcaption>
27
- <div class="content" style="background: rgba(0, 0, 0,<?php echo $slider_opacity; ?>);">
28
- <div class="container inner-content text-left">
29
- <h1><?php echo esc_html( $slide_title ); ?></h1>
30
- <p><?php echo esc_html( $slide_description ); ?></p>
31
- <a href="<?php echo esc_url( $slide_btn_link ); ?>" class="boxed-btn"><?php echo esc_html( $slide_btn_text ); ?><i class="fa fa-long-arrow-right"></i></a>
 
 
 
 
32
  </div>
33
  </div>
34
  </figcaption>
35
  </figure>
36
  </div>
 
37
  </div>
38
  </div>
39
  </div>
6
 
7
  function start_startkit_slider() {
8
 
9
+ function startkit_get_slider_default() {
10
+ return apply_filters(
11
+ 'startkit_get_slider_default', json_encode(
12
+ array(
13
+ array(
14
+ "image_url" => CLEVERFOX_PLUGIN_URL .'inc/startkit/images/slider/slider01.jpg' ,
15
+ "link" => "#", "title" => "Strengths of Successful Businesses",
16
+ "text" => "Randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anembarrassing hidden in the middle of text.",
17
+ "text2" => "Explore More",
18
+ "id" => "customizer_repeater_00070" ),
19
+
20
+ array("image_url" => CLEVERFOX_PLUGIN_URL .'inc/startkit/images/slider/slider02.jpg',
21
+ "link" => "#", "title" => "Strengths of Successful Businesses",
22
+ "text" => "Randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anembarrassing hidden in the middle of text.",
23
+ "text2" => "Explore More",
24
+ "id" => "customizer_repeater_00071" ),
25
+
26
+ array(
27
+ "image_url" => CLEVERFOX_PLUGIN_URL .'inc/startkit/images/slider/slider03.jpg',
28
+ "link" => "#",
29
+ "title" => "Strengths of Successful Businesses",
30
+ "text" => "Randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anembarrassing hidden in the middle of text.",
31
+ "text2" => "Explore More",
32
+ "id" => "customizer_repeater_00072" ),
33
+ )
34
+ )
35
+ );
36
+ }
37
+ $default_content = null;
38
+ if ( current_user_can( 'edit_theme_options' ) ) {
39
+ $default_content = startkit_get_slider_default();
40
+ }
41
+ $slider = get_theme_mod('slider',$default_content);
42
  $slider_opacity = get_theme_mod('slider_opacity','0.3');
43
  $hide_show_slider = get_theme_mod('hide_show_slider','1');
44
 
47
  <div class="row" id="lite-slite">
48
  <div class="col-md-12">
49
  <div class="header-slider">
50
+ <?php
51
+ if ( ! empty( $slider ) ) {
52
+ $allowed_html = array(
53
+ 'br' => array(),
54
+ 'em' => array(),
55
+ 'strong' => array(),
56
+ 'b' => array(),
57
+ 'i' => array(),
58
+ );
59
+ $slider = json_decode( $slider );
60
+ foreach ( $slider as $slide_item ) {
61
+ $title = ! empty( $slide_item->title ) ? apply_filters( 'startkit_translate_single_string', $slide_item->title, 'slider section' ) : '';
62
+ $text = ! empty( $slide_item->text ) ? apply_filters( 'startkit_translate_single_string', $slide_item->text, 'slider section' ) : '';
63
+ $button = ! empty( $slide_item->text2) ? apply_filters( 'startkit_translate_single_string', $slide_item->text2,'Learn More' ) : 'Read More';
64
+ $link = ! empty( $slide_item->link ) ? apply_filters( 'startkit_translate_single_string', $slide_item->link, 'slider section' ) : '';
65
+ $image = ! empty( $slide_item->image_url ) ? apply_filters( 'startkit_translate_single_string', $slide_item->image_url, 'slider section' ) : '';
66
+ ?>
67
  <div class="header-single-slider">
68
+ <figure>
69
+ <?php if ( ! empty( $image ) ) : ?>
70
+ <img src="<?php echo esc_url( $image ); ?>" <?php if ( ! empty( $title ) ) : ?> alt="<?php echo esc_attr( $title ); ?>" title="<?php echo esc_attr( $title ); ?>" <?php endif; ?> />
71
+ <?php endif; ?>
72
  <figcaption>
73
+ <div class="content" style="background: rgba(35, 48, 73,<?php echo $slider_opacity; ?>);">
74
+ <div class="container inner-content text-left" >
75
+ <?php if ( ! empty( $title ) ) : ?>
76
+ <h1><?php echo esc_html( $title ); ?></h1>
77
+ <?php endif; ?>
78
+ <?php if ( ! empty( $text ) ) : ?>
79
+ <p><?php echo esc_html( $text ); ?></p>
80
+ <?php endif; ?>
81
+ <a href="<?php echo esc_url( $link ); ?>" class="boxed-btn"><?php echo esc_html( $button ); ?><i class="icofont icofont-long-arrow-right"></i></a>
82
  </div>
83
  </div>
84
  </figcaption>
85
  </figure>
86
  </div>
87
+ <?php }} ?>
88
  </div>
89
  </div>
90
  </div>
readme.txt CHANGED
@@ -31,6 +31,10 @@ Clever Fox WordPress plugin is licensed under the GPL3 (https://www.gnu.org/lice
31
 
32
 
33
  == Changelog ==
 
 
 
 
34
  = 1.1.8 =
35
  * Code Improvement
36
 
31
 
32
 
33
  == Changelog ==
34
+ = 1.1.9 =
35
+ * Added More Slides
36
+ * Removed Unnecessary Images
37
+
38
  = 1.1.8 =
39
  * Code Improvement
40