Clever Fox - Version 1.1.20

Version Description

  • Envira Theme Functionality Added
Download this release

Release Info

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

Code changes from version 1.1.19 to 1.1.20

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.19
7
  Author: nayrathemes
8
  Author URI: https://nayrathemes.com
9
  Text Domain: clever-fox
@@ -16,8 +16,8 @@ function cleverfox_activate() {
16
  /**
17
  * Load Custom control in Customizer
18
  */
19
- define( 'OUR_DIRECTORY', plugin_dir_url( __FILE__ ) . '/inc/custom-controls/' );
20
- define( 'OUR_DIRECTORY_URI', plugin_dir_url( __FILE__ ) . '/inc/custom-controls/' );
21
  if ( class_exists( 'WP_Customize_Control' ) ) {
22
  require_once('inc/custom-controls/controls/range-validator/range-control.php');
23
  require_once('inc/custom-controls/controls/select/select-control.php');
@@ -67,6 +67,26 @@ function cleverfox_activate() {
67
  require_once('inc/startkit/features/section-typography.php');
68
  }
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  if( 'Hantus' == $theme->name){
71
  require_once('inc/hantus/features/navigation.php');
72
  require_once('inc/hantus/features/section-slider.php');
@@ -130,6 +150,21 @@ if ( 'Arowana' == $theme->name){
130
  }
131
  }
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  //Hantus
134
  if ( 'Hantus' == $theme->name){
135
  register_activation_hook( __FILE__, 'cleverfox_install_function');
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.20
7
  Author: nayrathemes
8
  Author URI: https://nayrathemes.com
9
  Text Domain: clever-fox
16
  /**
17
  * Load Custom control in Customizer
18
  */
19
+ define( 'CLEVERFOX_DIRECTORY', plugin_dir_url( __FILE__ ) . '/inc/custom-controls/' );
20
+ define( 'CLEVERFOX_DIRECTORY_URI', plugin_dir_url( __FILE__ ) . '/inc/custom-controls/' );
21
  if ( class_exists( 'WP_Customize_Control' ) ) {
22
  require_once('inc/custom-controls/controls/range-validator/range-control.php');
23
  require_once('inc/custom-controls/controls/select/select-control.php');
67
  require_once('inc/startkit/features/section-typography.php');
68
  }
69
 
70
+ if ('Envira' == $theme->name){
71
+
72
+ function cleverfox_envira_enqueue_scripts() {
73
+ wp_enqueue_script( 'counterup', plugin_dir_url( __FILE__ ) . 'inc/js/jquery.counterup.min.js', array('jquery'), false, true);
74
+ }
75
+ add_action( 'wp_enqueue_scripts', 'cleverfox_envira_enqueue_scripts' );
76
+
77
+ require_once('inc/startkit/features/section-slider.php');
78
+ require_once('inc/startkit/features/section-info.php');
79
+ require_once('inc/startkit/features/section-service.php');
80
+ require_once('inc/envira/features/funfact-section.php');
81
+ require_once('inc/startkit/features/navigation.php');
82
+ require_once('inc/startkit/sections/section-slider.php');
83
+ require_once('inc/startkit/sections/section-flash.php');
84
+ require_once('inc/startkit/sections/section-service.php');
85
+ require_once('inc/envira/sections/section-funfact.php');
86
+ require_once('inc/startkit/typography_style.php');
87
+ require_once('inc/startkit/features/section-typography.php');
88
+ }
89
+
90
  if( 'Hantus' == $theme->name){
91
  require_once('inc/hantus/features/navigation.php');
92
  require_once('inc/hantus/features/section-slider.php');
150
  }
151
  }
152
 
153
+ //Envira
154
+ if ( 'Envira' == $theme->name){
155
+ register_activation_hook( __FILE__, 'cleverfox_install_function');
156
+ function cleverfox_install_function()
157
+ {
158
+ $item_details_page = get_option('item_details_page');
159
+ if(!$item_details_page){
160
+ require_once('inc/envira/default-pages/upload-media.php');
161
+ require_once('inc/startkit/default-pages/home-page.php');
162
+ require_once('inc/envira/default-widgets/default-widget.php');
163
+ update_option( 'item_details_page', 'Done' );
164
+ }
165
+ }
166
+ }
167
+
168
  //Hantus
169
  if ( 'Hantus' == $theme->name){
170
  register_activation_hook( __FILE__, 'cleverfox_install_function');
inc/custom-controls/controls/icon-picker/icon-picker-control.php CHANGED
@@ -21,27 +21,27 @@
21
  }
22
 
23
  public function enqueue() {
24
- wp_enqueue_script( 'hantus-icon-picker-ddslick-min', OUR_DIRECTORY_URI . 'controls/icon-picker/assets/js/jquery.ddslick.min.js', array( 'jquery' ) );
25
- wp_enqueue_script( 'hantus-icon-picker-control', OUR_DIRECTORY_URI . 'controls/icon-picker/assets/js/icon-picker-control.js', array( 'jquery', 'hantus-icon-picker-ddslick-min' ), '', true );
26
  if ( in_array( $this->iconset, array( 'genericon', 'genericons' ) ) ) {
27
- wp_enqueue_style( 'genericons', OUR_DIRECTORY_URI . 'assets/genericons/genericons.css' );
28
  } elseif ( in_array( $this->iconset, array( 'dashicon', 'dashicons' ) ) ) {
29
  wp_enqueue_style( 'dashicons' );
30
  } else {
31
- wp_enqueue_style( 'font-awesome', OUR_DIRECTORY_URI . 'assets/font-awesome/css/font-awesome.min.css' );
32
  }
33
  }
34
 
35
  public function render_content() {
36
  if ( empty( $this->choices ) ) {
37
  if ( in_array( $this->iconset, array( 'genericon', 'genericons' ) ) ) {
38
- require_once OUR_DIRECTORY . 'controls/icon-picker/inc/genericons-icons.php';
39
  $this->choices = hantus_genericons_list();
40
  } elseif ( in_array( $this->iconset, array( 'dashicon', 'dashicons' ) ) ) {
41
- require_once OUR_DIRECTORY . 'controls/icon-picker/inc/dashicons-icons.php';
42
  $this->choices = hantus_dashicons_list();
43
  } else {
44
- require_once OUR_DIRECTORY . 'controls/icon-picker/inc/fa-icons.php';
45
  $this->choices = hantus_font_awesome_list();
46
  }
47
  }
21
  }
22
 
23
  public function enqueue() {
24
+ wp_enqueue_script( 'hantus-icon-picker-ddslick-min', CLEVERFOX_DIRECTORY_URI . 'controls/icon-picker/assets/js/jquery.ddslick.min.js', array( 'jquery' ) );
25
+ wp_enqueue_script( 'hantus-icon-picker-control', CLEVERFOX_DIRECTORY_URI . 'controls/icon-picker/assets/js/icon-picker-control.js', array( 'jquery', 'hantus-icon-picker-ddslick-min' ), '', true );
26
  if ( in_array( $this->iconset, array( 'genericon', 'genericons' ) ) ) {
27
+ wp_enqueue_style( 'genericons', CLEVERFOX_DIRECTORY_URI . 'assets/genericons/genericons.css' );
28
  } elseif ( in_array( $this->iconset, array( 'dashicon', 'dashicons' ) ) ) {
29
  wp_enqueue_style( 'dashicons' );
30
  } else {
31
+ wp_enqueue_style( 'font-awesome', CLEVERFOX_DIRECTORY_URI . 'assets/font-awesome/css/font-awesome.min.css' );
32
  }
33
  }
34
 
35
  public function render_content() {
36
  if ( empty( $this->choices ) ) {
37
  if ( in_array( $this->iconset, array( 'genericon', 'genericons' ) ) ) {
38
+ require_once CLEVERFOX_DIRECTORY . 'controls/icon-picker/inc/genericons-icons.php';
39
  $this->choices = hantus_genericons_list();
40
  } elseif ( in_array( $this->iconset, array( 'dashicon', 'dashicons' ) ) ) {
41
+ require_once CLEVERFOX_DIRECTORY . 'controls/icon-picker/inc/dashicons-icons.php';
42
  $this->choices = hantus_dashicons_list();
43
  } else {
44
+ require_once CLEVERFOX_DIRECTORY . 'controls/icon-picker/inc/fa-icons.php';
45
  $this->choices = hantus_font_awesome_list();
46
  }
47
  }
inc/custom-controls/controls/range-validator/range-control.php CHANGED
@@ -19,8 +19,8 @@
19
  }
20
 
21
  public function enqueue() {
22
- wp_enqueue_script( 'cleverfox-range-slider', OUR_DIRECTORY_URI . 'controls/range-validator/assets/js/range-control.js', array( 'jquery' ), '', true );
23
- wp_enqueue_style( 'cleverfox-range-slider', OUR_DIRECTORY_URI . 'controls/range-validator/assets/css/range-control.css' );
24
  }
25
 
26
  public function render_content() {
19
  }
20
 
21
  public function enqueue() {
22
+ wp_enqueue_script( 'cleverfox-range-slider', CLEVERFOX_DIRECTORY_URI . 'controls/range-validator/assets/js/range-control.js', array( 'jquery' ), '', true );
23
+ wp_enqueue_style( 'cleverfox-range-slider', CLEVERFOX_DIRECTORY_URI . 'controls/range-validator/assets/css/range-control.css' );
24
  }
25
 
26
  public function render_content() {
inc/custom-controls/controls/select/select-control.php CHANGED
@@ -10,9 +10,9 @@
10
  public $type = 'hantus-select';
11
 
12
  public function enqueue() {
13
- wp_enqueue_script( 'selectize-js', OUR_DIRECTORY_URI . 'controls/select/assets/js/selectize.min.js', array( 'jquery' ) );
14
- wp_enqueue_script( 'cleverfox-select-control', OUR_DIRECTORY_URI . 'controls/select/assets/js/select-control.js', array( 'jquery', 'selectize-js' ), '', true );
15
- wp_enqueue_style( 'selectize-css', OUR_DIRECTORY_URI . 'controls/select/selectize.default.css' );
16
  }
17
 
18
  public function render_content() {
10
  public $type = 'hantus-select';
11
 
12
  public function enqueue() {
13
+ wp_enqueue_script( 'selectize-js', CLEVERFOX_DIRECTORY_URI . 'controls/select/assets/js/selectize.min.js', array( 'jquery' ) );
14
+ wp_enqueue_script( 'cleverfox-select-control', CLEVERFOX_DIRECTORY_URI . 'controls/select/assets/js/select-control.js', array( 'jquery', 'selectize-js' ), '', true );
15
+ wp_enqueue_style( 'selectize-css', CLEVERFOX_DIRECTORY_URI . 'controls/select/selectize.default.css' );
16
  }
17
 
18
  public function render_content() {
inc/envira/default-pages/upload-media.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $file = CLEVERFOX_PLUGIN_URL .'inc/envira/images/logo.png';
3
+ $ImagePath = CLEVERFOX_PLUGIN_URL .'inc/envira/images';
4
+
5
+ $images = array(
6
+ $ImagePath. '/logo.png',
7
+ );
8
+ $parent_post_id = null;
9
+ foreach($images as $name) {
10
+ $filename = basename($name);
11
+ $upload_file = wp_upload_bits($filename, null, file_get_contents($name));
12
+ if (!$upload_file['error']) {
13
+ $wp_filetype = wp_check_filetype($filename, null );
14
+ $attachment = array(
15
+ 'post_mime_type' => $wp_filetype['type'],
16
+ 'post_parent' => $parent_post_id,
17
+ 'post_title' => preg_replace('/\.[^.]+$/', '', $filename),
18
+ 'post_excerpt' => 'startkit caption',
19
+ 'post_status' => 'inherit'
20
+ );
21
+ $ImageId[] = $attachment_id = wp_insert_attachment( $attachment, $upload_file['file'], $parent_post_id );
22
+
23
+ if (!is_wp_error($attachment_id)) {
24
+ require_once(ABSPATH . "wp-admin" . '/includes/image.php');
25
+ $attachment_data = wp_generate_attachment_metadata( $attachment_id, $upload_file['file'] );
26
+ wp_update_attachment_metadata( $attachment_id, $attachment_data );
27
+ }
28
+ }
29
+
30
+ }
31
+
32
+ update_option( 'startkit_media_id', $ImageId );
33
+
34
+ ?>
inc/envira/default-widgets/default-widget.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $activate = array(
3
+ 'footer-widget-area' => array(
4
+ 'footer-widget-area',
5
+ 'recent-posts-1',
6
+ 'archives-1',
7
+ ),
8
+ 'footer-widget-area' => array(
9
+ 'text-1',
10
+ ),
11
+ );
12
+ /* the default titles will appear */
13
+ update_option('widget_text', array(
14
+ 1 => array('title' => '',
15
+ 'text'=>'<div class="footer-logo"><img class="img-responsive" src="'.CLEVERFOX_PLUGIN_URL.'inc/envira/images/logo.png" alt="Logo" /><div>
16
+ <p class="widget-text">Gonsectetur adipi sicing elit, sed do eiusmod tempor incididunt labore et.dolore magna aliquauis a irure dolor eiusmod.</p><a href="#">Go for details <i class="fa fa-long-arrow-right"></i></a>
17
+ '),
18
+ 2 => array('title' => 'Recent Posts'),
19
+ 3 => array('title' => 'Categories'),
20
+ ));
21
+
22
+ update_option('sidebars_widgets', $activate);
23
+ $MediaId = get_option('startkit_media_id');
24
+ set_theme_mod( 'custom_logo', $MediaId[0] );
25
+ ?>
inc/envira/features/funfact-section.php ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! function_exists( 'startkit_funfact_setting' ) ) :
3
+ function startkit_funfact_setting( $wp_customize ) {
4
+ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
5
+ /*=========================================
6
+ funfact Section Panel
7
+ =========================================*/
8
+ $wp_customize->add_section(
9
+ 'Funfact_setting', array(
10
+ 'title' => esc_html__( 'Funfact Section', 'startkit-pro' ),
11
+ 'panel' => 'startkit_frontpage_sections',
12
+ 'priority' => apply_filters( 'startkit_section_priority', 30, 'startkit_Funfact' ),
13
+ )
14
+ );
15
+ /*=========================================
16
+ Funfact Settings Section
17
+ =========================================*/
18
+ // Slider Hide/ Show Setting //
19
+ if ( class_exists( 'Startkit_Customizer_Toggle_Control' ) ) {
20
+ $wp_customize->add_setting(
21
+ 'hide_show_funfact' ,
22
+ array(
23
+ 'default' => esc_html__( '1', 'startkit' ),
24
+ 'capability' => 'edit_theme_options',
25
+ 'sanitize_callback' => 'sanitize_text_field',
26
+ 'transport' => $selective_refresh,
27
+ )
28
+ );
29
+
30
+ $wp_customize->add_control( new Startkit_Customizer_Toggle_Control( $wp_customize,
31
+ 'hide_show_funfact',
32
+ array(
33
+ 'label' => esc_html__( 'Hide / Show Section', 'startkit' ),
34
+ 'section' => 'Funfact_setting',
35
+ 'settings' => 'hide_show_funfact',
36
+ 'type' => 'ios', // light, ios, flat
37
+ )
38
+ ));
39
+ }
40
+
41
+ // funfact content Section //
42
+
43
+
44
+ /**
45
+ * Customizer Repeater for add funfact
46
+ */
47
+ $wp_customize->add_setting( 'funfact_contents',
48
+ array(
49
+ 'sanitize_callback' => 'startkit_repeater_sanitize',
50
+ 'default' => json_encode(
51
+ array(
52
+ array(
53
+ 'title' => esc_html__( '9.1', 'startkit' ),
54
+ 'subtitle' => esc_html__( 'B', 'startkit' ),
55
+ 'text' => esc_html__( 'Users', 'startkit' ),
56
+ 'icon_value' => esc_html__( 'fa fa-users', 'startkit' ),
57
+ 'id' => 'customizer_repeater_funfact_001',
58
+ ),
59
+ array(
60
+ 'title' => esc_html__( '8.2', 'startkit' ),
61
+ 'subtitle' => esc_html__( 'B', 'startkit' ),
62
+ 'text' => esc_html__( 'Downloads', 'startkit' ),
63
+ 'icon_value' => esc_html__( 'fal fa-download', 'startkit' ),
64
+ 'id' => 'customizer_repeater_funfact_001',
65
+
66
+ ),
67
+ array(
68
+ 'title' => esc_html__( '2.26', 'startkit' ),
69
+ 'subtitle' => esc_html__( 'B', 'startkit' ),
70
+ 'text' => esc_html__( 'Reviews', 'startkit' ),
71
+ 'icon_value' => esc_html__( 'fa fa-star-half-o', 'startkit' ),
72
+ 'id' => 'customizer_repeater_funfact_001',
73
+
74
+ ),
75
+ array(
76
+ 'title' => esc_html__( '9.1', 'startkit' ),
77
+ 'subtitle' => esc_html__( 'B', 'startkit' ),
78
+ 'text' => esc_html__( 'Users', 'startkit' ),
79
+ 'icon_value' => esc_html__( 'fa fa-trophy', 'startkit' ),
80
+ 'id' => 'customizer_repeater_funfact_001',
81
+
82
+ ),
83
+ )
84
+ )
85
+ )
86
+ );
87
+
88
+ $wp_customize->add_control(
89
+ new Startkit_Repeater( $wp_customize,
90
+ 'funfact_contents',
91
+ array(
92
+ 'label' => esc_html__('Funfact','startkit'),
93
+ 'section' => 'Funfact_setting',
94
+ 'add_field_label' => esc_html__( 'Add New Funfact', 'startkit' ),
95
+ 'item_name' => esc_html__( 'Funfact', 'startkit' ),
96
+ 'priority' => 1,
97
+ 'customizer_repeater_icon_control' => true,
98
+ 'customizer_repeater_title_control' => true,
99
+ 'customizer_repeater_subtitle_control' => true,
100
+ 'customizer_repeater_text_control' => true,
101
+ 'customizer_repeater_checkbox_control' => false,
102
+ )
103
+ )
104
+ );
105
+
106
+ //Pro feature
107
+ class Startkit_funfact__section_upgrade extends WP_Customize_Control {
108
+ public function render_content() { ?>
109
+ <a class="customizer_funfact_upgrade_section up-to-pro" href="https://www.nayrathemes.com/startkit-pro/" target="_blank" style="display: none;"><?php _e('Upgrade to Pro','startkit'); ?></a>
110
+ <?php
111
+ }
112
+ }
113
+
114
+
115
+ $wp_customize->add_setting( 'startkit_funfact_upgrade_to_pro', array(
116
+ 'capability' => 'edit_theme_options',
117
+ 'sanitize_callback' => 'wp_filter_nohtml_kses',
118
+ ));
119
+ $wp_customize->add_control(
120
+ new Startkit_funfact__section_upgrade(
121
+ $wp_customize,
122
+ 'startkit_funfact_upgrade_to_pro',
123
+ array(
124
+ 'section' => 'Funfact_setting',
125
+ 'settings' => 'startkit_funfact_upgrade_to_pro',
126
+ )
127
+ )
128
+ );
129
+ // Funfact Background Section //
130
+
131
+
132
+ // Background Image //
133
+ $wp_customize->add_setting(
134
+ 'funfact_background_setting' ,
135
+ array(
136
+ 'default' => CLEVERFOX_PLUGIN_URL . 'inc/envira/images/factbg.jpg',
137
+ 'capability' => 'edit_theme_options',
138
+ 'sanitize_callback' => 'startkit_sanitize_url',
139
+ )
140
+ );
141
+
142
+ $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize , 'funfact_background_setting' ,
143
+ array(
144
+ 'label' => __( 'Background Image', 'startkit' ),
145
+ 'section' => 'Funfact_setting',
146
+ 'settings' => 'funfact_background_setting',
147
+ )
148
+ ));
149
+ $wp_customize->add_setting(
150
+ 'funfact_background_position' ,
151
+ array(
152
+ 'default' => __( 'fixed', 'startkit' ),
153
+ 'capability' => 'edit_theme_options',
154
+ 'sanitize_callback' => 'startkit_sanitize_select',
155
+ )
156
+ );
157
+
158
+ $wp_customize->add_control(
159
+ 'funfact_background_position' ,
160
+ array(
161
+ 'label' => __( 'Image Position', 'startkit' ),
162
+ 'section' => 'Funfact_setting',
163
+ 'settings' => 'funfact_background_position',
164
+ 'type' => 'radio',
165
+ 'choices' =>
166
+ array(
167
+ 'fixed'=> __( 'Fixed', 'startkit' ),
168
+ 'scroll' => __( 'Scroll', 'startkit' )
169
+ )
170
+ )
171
+ );
172
+
173
+ }
174
+ add_action( 'customize_register', 'startkit_funfact_setting' );
175
+ endif;
176
+ ?>
177
+ <?php
178
+ // Customizer tabs
179
+
180
+ function startkit_funfact_customize_register( $wp_customize ) {
181
+ if ( class_exists( 'Cleverfox_Customize_Control_Tabs' ) ) {
182
+
183
+ // Pricing Tables Tabs
184
+ $wp_customize->add_setting(
185
+ 'startkit_funfact_tabs', array(
186
+ 'sanitize_callback' => 'sanitize_text_field',
187
+ )
188
+ );
189
+
190
+ $wp_customize->add_control(
191
+ new Cleverfox_Customize_Control_Tabs(
192
+ $wp_customize, 'startkit_funfact_tabs', array(
193
+ 'section' => 'Funfact_setting',
194
+ 'tabs' => array(
195
+ 'general' => array(
196
+ 'nicename' => esc_html__( 'Setting', 'startkit' ),
197
+ 'icon' => 'cogs',
198
+ 'controls' => array(
199
+ 'hide_show_funfact',
200
+ ),
201
+ ),
202
+ 'first' => array(
203
+ 'nicename' => esc_html__( 'Content', 'startkit' ),
204
+ 'icon' => 'info',
205
+ 'controls' => array(
206
+ 'funfact_contents',
207
+ 'startkit_funfact_upgrade_to_pro',
208
+ ),
209
+ ),
210
+ 'second' => array(
211
+ 'nicename' => esc_html__( 'Background', 'startkit' ),
212
+ 'icon' => 'history',
213
+ 'controls' => array(
214
+ 'funfact_background_setting',
215
+ 'funfact_background_position',
216
+ ),
217
+ ),
218
+ ),
219
+ )
220
+ )
221
+ );
222
+ }
223
+ }
224
+ add_action( 'customize_register', 'startkit_funfact_customize_register' );
225
+ // funfact selective refresh
226
+ function startkit_home_funfact_section_partials( $wp_customize ){
227
+ // hide show feature
228
+ $wp_customize->selective_refresh->add_partial(
229
+ 'hide_show_funfact', array(
230
+ 'selector' => '#fun-fact',
231
+ 'container_inclusive' => true,
232
+ 'render_callback' => 'Funfact_setting',
233
+ 'fallback_refresh' => true,
234
+ )
235
+ );
236
+ // funfact
237
+ $wp_customize->selective_refresh->add_partial( 'funfact_contents', array(
238
+ 'selector' => '#fun-fact .text-center',
239
+ 'settings' => 'funfact_contents',
240
+ 'render_callback' => 'home_section_funfact_render_callback',
241
+
242
+ ) );
243
+
244
+ }
245
+
246
+ add_action( 'customize_register', 'startkit_home_funfact_section_partials' );
247
+
248
+ // social icons
249
+ function home_section_funfact_render_callback() {
250
+ $funfact_contents = get_theme_mod( 'funfact_contents' );
251
+ funfact_contents( $funfact_contents, true );
252
+
253
+ }
inc/envira/images/factbg.jpg ADDED
Binary file
inc/envira/images/logo.png ADDED
Binary file
inc/envira/sections/section-funfact.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Get default values for service section.
4
+ *
5
+ * @since 1.1.0
6
+ * @access public
7
+ */
8
+ if ( ! function_exists( 'startkit_funfact_plu' ) ) :
9
+
10
+ function startkit_funfact_plu() {
11
+ function startkit_get_funfact_default() {
12
+ return apply_filters(
13
+ 'startkit_get_funfact_default', json_encode(
14
+ array(
15
+ array(
16
+ 'title' => esc_html__( '9.1', 'startkit-pro' ),
17
+ 'subtitle' => esc_html__( 'B', 'startkit-pro' ),
18
+ 'text' => esc_html__( 'Users', 'startkit-pro' ),
19
+ 'icon_value' => esc_html__( 'fa fa-users', 'startkit-pro' ),
20
+ 'id' => 'customizer_repeater_funfact_001',
21
+ ),
22
+ array(
23
+ 'title' => esc_html__( '8.2', 'startkit-pro' ),
24
+ 'subtitle' => esc_html__( 'B', 'startkit-pro' ),
25
+ 'text' => esc_html__( 'Downloads', 'startkit-pro' ),
26
+ 'icon_value' => esc_html__( 'fal fa-download', 'startkit-pro' ),
27
+ 'id' => 'customizer_repeater_funfact_001',
28
+
29
+ ),
30
+ array(
31
+ 'title' => esc_html__( '2.26', 'startkit-pro' ),
32
+ 'subtitle' => esc_html__( 'B', 'startkit-pro' ),
33
+ 'text' => esc_html__( 'Reviews', 'startkit-pro' ),
34
+ 'icon_value' => esc_html__( 'fa fa-star-half-o', 'startkit-pro' ),
35
+ 'id' => 'customizer_repeater_funfact_001',
36
+
37
+ ),
38
+ array(
39
+ 'title' => esc_html__( '9.1', 'startkit-pro' ),
40
+ 'subtitle' => esc_html__( 'B', 'startkit-pro' ),
41
+ 'text' => esc_html__( 'Users', 'startkit-pro' ),
42
+ 'icon_value' => esc_html__( 'fa fa-trophy', 'startkit-pro' ),
43
+ 'id' => 'customizer_repeater_funfact_001',
44
+
45
+ ),
46
+ )
47
+ )
48
+ );
49
+ }
50
+
51
+ $default_content = null;
52
+ if ( current_user_can( 'edit_theme_options' ) ) {
53
+ $default_content = startkit_get_funfact_default();
54
+ }
55
+ ?>
56
+ <?php
57
+ $hide_show_funfact = get_theme_mod('hide_show_funfact','1');
58
+ $funfact_contents = get_theme_mod('funfact_contents',$default_content);
59
+ $funfact_background_setting = get_theme_mod('funfact_background_setting',CLEVERFOX_PLUGIN_URL . 'inc/envira/images/factbg.jpg');
60
+ $funfact_background_position= get_theme_mod('funfact_background_position','fixed');
61
+
62
+ if($hide_show_funfact == '1') {
63
+ ?>
64
+ <?php if ( ! empty( $funfact_background_setting ) ) { ?>
65
+ <section id="fun-fact" style="background:url('<?php echo esc_url($funfact_background_setting); ?>') no-repeat center / cover <?php echo esc_attr($funfact_background_position); ?>;">
66
+ <?php } else { ?>
67
+ <section id="fun-fact" class="fun-background">
68
+ <?php } ?>
69
+ <div class="container">
70
+ <div class="row text-center">
71
+ <?php
72
+
73
+ if ( ! empty( $funfact_contents ) ) {
74
+ $allowed_html = array(
75
+ 'br' => array(),
76
+ 'em' => array(),
77
+ 'strong' => array(),
78
+ 'b' => array(),
79
+ 'i' => array(),
80
+ );
81
+ $funfact_contents = json_decode( $funfact_contents );
82
+ foreach ( $funfact_contents as $funfact_item ) {
83
+ $icon = ! empty( $funfact_item->icon_value ) ? apply_filters( 'startkit_translate_single_string', $funfact_item->icon_value, 'funfact section' ) : '';
84
+ $title = ! empty( $funfact_item->title ) ? apply_filters( 'startkit_translate_single_string', $funfact_item->title, 'funfact section' ) : '';
85
+ $subtitle = ! empty( $funfact_item->subtitle ) ? apply_filters( 'startkit_translate_single_string', $funfact_item->subtitle, 'funfact section' ) : '';
86
+ $text = ! empty( $funfact_item->text ) ? apply_filters( 'startkit_translate_single_string', $funfact_item->text, 'funfact section' ) : '';
87
+ ?>
88
+ <div class="col-lg-3 col-md-6 col-sm-6 col-12 mb-lg-0 mb-4 home-fun">
89
+ <div class="fact-item">
90
+ <?php if ( ! empty( $icon ) ) :?>
91
+ <i class="fa <?php echo esc_attr( $icon ); ?>"></i>
92
+ <?php endif; ?>
93
+ <?php if ( ! empty( $title ) ) :?>
94
+ <div><strong><span class="counter"><?php echo wp_filter_post_kses( $title ); ?></span> <?php echo esc_html($subtitle); ?></strong></div>
95
+ <?php endif; ?>
96
+ <?php if ( ! empty( $text ) ) :?>
97
+ <p><?php echo esc_html( $text ); ?></p>
98
+ <?php endif; ?>
99
+ </div>
100
+ </div>
101
+ <?php } } ?>
102
+ </div>
103
+ </div>
104
+ </section>
105
+ </section>
106
+ <?php
107
+ }
108
+ }
109
+
110
+ endif;
111
+ if ( function_exists( 'startkit_funfact_plu' ) ) {
112
+ $section_priority = apply_filters( 'startkit_section_priority', 13, 'startkit_funfact_plu' );
113
+ add_action( 'startkit_sections', 'startkit_funfact_plu', absint( $section_priority ) );
114
+
115
+ }
116
+ ?>
inc/js/jquery.counterup.js ADDED
@@ -0,0 +1,369 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ Waypoints - 4.0.0
3
+ Copyright © 2011-2015 Caleb Troughton
4
+ Licensed under the MIT license.
5
+ https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
6
+ */
7
+ ! function() {
8
+ "use strict";
9
+
10
+ function t(o) {
11
+ if (!o) throw new Error("No options passed to Waypoint constructor");
12
+ if (!o.element) throw new Error("No element option passed to Waypoint constructor");
13
+ if (!o.handler) throw new Error("No handler option passed to Waypoint constructor");
14
+ this.key = "waypoint-" + e, this.options = t.Adapter.extend({}, t.defaults, o), this.element = this.options.element, this.adapter = new t.Adapter(this.element), this.callback = o.handler, this.axis = this.options.horizontal ? "horizontal" : "vertical", this.enabled = this.options.enabled, this.triggerPoint = null, this.group = t.Group.findOrCreate({
15
+ name: this.options.group,
16
+ axis: this.axis
17
+ }), this.context = t.Context.findOrCreateByElement(this.options.context), t.offsetAliases[this.options.offset] && (this.options.offset = t.offsetAliases[this.options.offset]), this.group.add(this), this.context.add(this), i[this.key] = this, e += 1
18
+ }
19
+ var e = 0,
20
+ i = {};
21
+ t.prototype.queueTrigger = function(t) {
22
+ this.group.queueTrigger(this, t)
23
+ }, t.prototype.trigger = function(t) {
24
+ this.enabled && this.callback && this.callback.apply(this, t)
25
+ }, t.prototype.destroy = function() {
26
+ this.context.remove(this), this.group.remove(this), delete i[this.key]
27
+ }, t.prototype.disable = function() {
28
+ return this.enabled = !1, this
29
+ }, t.prototype.enable = function() {
30
+ return this.context.refresh(), this.enabled = !0, this
31
+ }, t.prototype.next = function() {
32
+ return this.group.next(this)
33
+ }, t.prototype.previous = function() {
34
+ return this.group.previous(this)
35
+ }, t.invokeAll = function(t) {
36
+ var e = [];
37
+ for (var o in i) e.push(i[o]);
38
+ for (var n = 0, r = e.length; r > n; n++) e[n][t]()
39
+ }, t.destroyAll = function() {
40
+ t.invokeAll("destroy")
41
+ }, t.disableAll = function() {
42
+ t.invokeAll("disable")
43
+ }, t.enableAll = function() {
44
+ t.invokeAll("enable")
45
+ }, t.refreshAll = function() {
46
+ t.Context.refreshAll()
47
+ }, t.viewportHeight = function() {
48
+ return window.innerHeight || document.documentElement.clientHeight
49
+ }, t.viewportWidth = function() {
50
+ return document.documentElement.clientWidth
51
+ }, t.adapters = [], t.defaults = {
52
+ context: window,
53
+ continuous: !0,
54
+ enabled: !0,
55
+ group: "default",
56
+ horizontal: !1,
57
+ offset: 0
58
+ }, t.offsetAliases = {
59
+ "bottom-in-view": function() {
60
+ return this.context.innerHeight() - this.adapter.outerHeight()
61
+ },
62
+ "right-in-view": function() {
63
+ return this.context.innerWidth() - this.adapter.outerWidth()
64
+ }
65
+ }, window.Waypoint = t
66
+ }(),
67
+ function() {
68
+ "use strict";
69
+
70
+ function t(t) {
71
+ window.setTimeout(t, 1e3 / 60)
72
+ }
73
+
74
+ function e(t) {
75
+ this.element = t, this.Adapter = n.Adapter, this.adapter = new this.Adapter(t), this.key = "waypoint-context-" + i, this.didScroll = !1, this.didResize = !1, this.oldScroll = {
76
+ x: this.adapter.scrollLeft(),
77
+ y: this.adapter.scrollTop()
78
+ }, this.waypoints = {
79
+ vertical: {},
80
+ horizontal: {}
81
+ }, t.waypointContextKey = this.key, o[t.waypointContextKey] = this, i += 1, this.createThrottledScrollHandler(), this.createThrottledResizeHandler()
82
+ }
83
+ var i = 0,
84
+ o = {},
85
+ n = window.Waypoint,
86
+ r = window.onload;
87
+ e.prototype.add = function(t) {
88
+ var e = t.options.horizontal ? "horizontal" : "vertical";
89
+ this.waypoints[e][t.key] = t, this.refresh()
90
+ }, e.prototype.checkEmpty = function() {
91
+ var t = this.Adapter.isEmptyObject(this.waypoints.horizontal),
92
+ e = this.Adapter.isEmptyObject(this.waypoints.vertical);
93
+ t && e && (this.adapter.off(".waypoints"), delete o[this.key])
94
+ }, e.prototype.createThrottledResizeHandler = function() {
95
+ function t() {
96
+ e.handleResize(), e.didResize = !1
97
+ }
98
+ var e = this;
99
+ this.adapter.on("resize.waypoints", function() {
100
+ e.didResize || (e.didResize = !0, n.requestAnimationFrame(t))
101
+ })
102
+ }, e.prototype.createThrottledScrollHandler = function() {
103
+ function t() {
104
+ e.handleScroll(), e.didScroll = !1
105
+ }
106
+ var e = this;
107
+ this.adapter.on("scroll.waypoints", function() {
108
+ (!e.didScroll || n.isTouch) && (e.didScroll = !0, n.requestAnimationFrame(t))
109
+ })
110
+ }, e.prototype.handleResize = function() {
111
+ n.Context.refreshAll()
112
+ }, e.prototype.handleScroll = function() {
113
+ var t = {},
114
+ e = {
115
+ horizontal: {
116
+ newScroll: this.adapter.scrollLeft(),
117
+ oldScroll: this.oldScroll.x,
118
+ forward: "right",
119
+ backward: "left"
120
+ },
121
+ vertical: {
122
+ newScroll: this.adapter.scrollTop(),
123
+ oldScroll: this.oldScroll.y,
124
+ forward: "down",
125
+ backward: "up"
126
+ }
127
+ };
128
+ for (var i in e) {
129
+ var o = e[i],
130
+ n = o.newScroll > o.oldScroll,
131
+ r = n ? o.forward : o.backward;
132
+ for (var s in this.waypoints[i]) {
133
+ var a = this.waypoints[i][s],
134
+ l = o.oldScroll < a.triggerPoint,
135
+ h = o.newScroll >= a.triggerPoint,
136
+ p = l && h,
137
+ u = !l && !h;
138
+ (p || u) && (a.queueTrigger(r), t[a.group.id] = a.group)
139
+ }
140
+ }
141
+ for (var c in t) t[c].flushTriggers();
142
+ this.oldScroll = {
143
+ x: e.horizontal.newScroll,
144
+ y: e.vertical.newScroll
145
+ }
146
+ }, e.prototype.innerHeight = function() {
147
+ return this.element == this.element.window ? n.viewportHeight() : this.adapter.innerHeight()
148
+ }, e.prototype.remove = function(t) {
149
+ delete this.waypoints[t.axis][t.key], this.checkEmpty()
150
+ }, e.prototype.innerWidth = function() {
151
+ return this.element == this.element.window ? n.viewportWidth() : this.adapter.innerWidth()
152
+ }, e.prototype.destroy = function() {
153
+ var t = [];
154
+ for (var e in this.waypoints)
155
+ for (var i in this.waypoints[e]) t.push(this.waypoints[e][i]);
156
+ for (var o = 0, n = t.length; n > o; o++) t[o].destroy()
157
+ }, e.prototype.refresh = function() {
158
+ var t, e = this.element == this.element.window,
159
+ i = e ? void 0 : this.adapter.offset(),
160
+ o = {};
161
+ this.handleScroll(), t = {
162
+ horizontal: {
163
+ contextOffset: e ? 0 : i.left,
164
+ contextScroll: e ? 0 : this.oldScroll.x,
165
+ contextDimension: this.innerWidth(),
166
+ oldScroll: this.oldScroll.x,
167
+ forward: "right",
168
+ backward: "left",
169
+ offsetProp: "left"
170
+ },
171
+ vertical: {
172
+ contextOffset: e ? 0 : i.top,
173
+ contextScroll: e ? 0 : this.oldScroll.y,
174
+ contextDimension: this.innerHeight(),
175
+ oldScroll: this.oldScroll.y,
176
+ forward: "down",
177
+ backward: "up",
178
+ offsetProp: "top"
179
+ }
180
+ };
181
+ for (var r in t) {
182
+ var s = t[r];
183
+ for (var a in this.waypoints[r]) {
184
+ var l, h, p, u, c, d = this.waypoints[r][a],
185
+ f = d.options.offset,
186
+ w = d.triggerPoint,
187
+ y = 0,
188
+ g = null == w;
189
+ d.element !== d.element.window && (y = d.adapter.offset()[s.offsetProp]), "function" == typeof f ? f = f.apply(d) : "string" == typeof f && (f = parseFloat(f), d.options.offset.indexOf("%") > -1 && (f = Math.ceil(s.contextDimension * f / 100))), l = s.contextScroll - s.contextOffset, d.triggerPoint = y + l - f, h = w < s.oldScroll, p = d.triggerPoint >= s.oldScroll, u = h && p, c = !h && !p, !g && u ? (d.queueTrigger(s.backward), o[d.group.id] = d.group) : !g && c ? (d.queueTrigger(s.forward), o[d.group.id] = d.group) : g && s.oldScroll >= d.triggerPoint && (d.queueTrigger(s.forward), o[d.group.id] = d.group)
190
+ }
191
+ }
192
+ return n.requestAnimationFrame(function() {
193
+ for (var t in o) o[t].flushTriggers()
194
+ }), this
195
+ }, e.findOrCreateByElement = function(t) {
196
+ return e.findByElement(t) || new e(t)
197
+ }, e.refreshAll = function() {
198
+ for (var t in o) o[t].refresh()
199
+ }, e.findByElement = function(t) {
200
+ return o[t.waypointContextKey]
201
+ }, window.onload = function() {
202
+ r && r(), e.refreshAll()
203
+ }, n.requestAnimationFrame = function(e) {
204
+ var i = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || t;
205
+ i.call(window, e)
206
+ }, n.Context = e
207
+ }(),
208
+ function() {
209
+ "use strict";
210
+
211
+ function t(t, e) {
212
+ return t.triggerPoint - e.triggerPoint
213
+ }
214
+
215
+ function e(t, e) {
216
+ return e.triggerPoint - t.triggerPoint
217
+ }
218
+
219
+ function i(t) {
220
+ this.name = t.name, this.axis = t.axis, this.id = this.name + "-" + this.axis, this.waypoints = [], this.clearTriggerQueues(), o[this.axis][this.name] = this
221
+ }
222
+ var o = {
223
+ vertical: {},
224
+ horizontal: {}
225
+ },
226
+ n = window.Waypoint;
227
+ i.prototype.add = function(t) {
228
+ this.waypoints.push(t)
229
+ }, i.prototype.clearTriggerQueues = function() {
230
+ this.triggerQueues = {
231
+ up: [],
232
+ down: [],
233
+ left: [],
234
+ right: []
235
+ }
236
+ }, i.prototype.flushTriggers = function() {
237
+ for (var i in this.triggerQueues) {
238
+ var o = this.triggerQueues[i],
239
+ n = "up" === i || "left" === i;
240
+ o.sort(n ? e : t);
241
+ for (var r = 0, s = o.length; s > r; r += 1) {
242
+ var a = o[r];
243
+ (a.options.continuous || r === o.length - 1) && a.trigger([i])
244
+ }
245
+ }
246
+ this.clearTriggerQueues()
247
+ }, i.prototype.next = function(e) {
248
+ this.waypoints.sort(t);
249
+ var i = n.Adapter.inArray(e, this.waypoints),
250
+ o = i === this.waypoints.length - 1;
251
+ return o ? null : this.waypoints[i + 1]
252
+ }, i.prototype.previous = function(e) {
253
+ this.waypoints.sort(t);
254
+ var i = n.Adapter.inArray(e, this.waypoints);
255
+ return i ? this.waypoints[i - 1] : null
256
+ }, i.prototype.queueTrigger = function(t, e) {
257
+ this.triggerQueues[e].push(t)
258
+ }, i.prototype.remove = function(t) {
259
+ var e = n.Adapter.inArray(t, this.waypoints);
260
+ e > -1 && this.waypoints.splice(e, 1)
261
+ }, i.prototype.first = function() {
262
+ return this.waypoints[0]
263
+ }, i.prototype.last = function() {
264
+ return this.waypoints[this.waypoints.length - 1]
265
+ }, i.findOrCreate = function(t) {
266
+ return o[t.axis][t.name] || new i(t)
267
+ }, n.Group = i
268
+ }(),
269
+ function() {
270
+ "use strict";
271
+
272
+ function t(t) {
273
+ this.$element = e(t)
274
+ }
275
+ var e = window.jQuery,
276
+ i = window.Waypoint;
277
+ e.each(["innerHeight", "innerWidth", "off", "offset", "on", "outerHeight", "outerWidth", "scrollLeft", "scrollTop"], function(e, i) {
278
+ t.prototype[i] = function() {
279
+ var t = Array.prototype.slice.call(arguments);
280
+ return this.$element[i].apply(this.$element, t)
281
+ }
282
+ }), e.each(["extend", "inArray", "isEmptyObject"], function(i, o) {
283
+ t[o] = e[o]
284
+ }), i.adapters.push({
285
+ name: "jquery",
286
+ Adapter: t
287
+ }), i.Adapter = t
288
+ }(),
289
+ function() {
290
+ "use strict";
291
+
292
+ function t(t) {
293
+ return function() {
294
+ var i = [],
295
+ o = arguments[0];
296
+ return t.isFunction(arguments[0]) && (o = t.extend({}, arguments[1]), o.handler = arguments[0]), this.each(function() {
297
+ var n = t.extend({}, o, {
298
+ element: this
299
+ });
300
+ "string" == typeof n.context && (n.context = t(this).closest(n.context)[0]), i.push(new e(n))
301
+ }), i
302
+ }
303
+ }
304
+ var e = window.Waypoint;
305
+ window.jQuery && (window.jQuery.fn.waypoint = t(window.jQuery)), window.Zepto && (window.Zepto.fn.waypoint = t(window.Zepto))
306
+ }();
307
+
308
+ /*!
309
+ * jquery.counterup.js 1.0
310
+ *
311
+ * Copyright 2013, Benjamin Intal http://gambit.ph @bfintal
312
+ * Released under the GPL v2 License
313
+ *
314
+ * Date: Nov 26, 2013
315
+ */
316
+ (function(e) {
317
+ "use strict";
318
+ e.fn.counterUp = function(t) {
319
+ var n = e.extend({
320
+ time: 400,
321
+ delay: 10
322
+ }, t);
323
+ return this.each(function() {
324
+ var t = e(this),
325
+ r = n,
326
+ i = function() {
327
+ var e = [],
328
+ n = r.time / r.delay,
329
+ i = t.text(),
330
+ s = /[0-9]+,[0-9]+/.test(i);
331
+ i = i.replace(/,/g, "");
332
+ var o = /^[0-9]+$/.test(i),
333
+ u = /^[0-9]+\.[0-9]+$/.test(i),
334
+ a = u ? (i.split(".")[1] || []).length : 0;
335
+ for (var f = n; f >= 1; f--) {
336
+ var l = parseInt(i / n * f);
337
+ u && (l = parseFloat(i / n * f).toFixed(a));
338
+ if (s)
339
+ while (/(\d+)(\d{3})/.test(l.toString())) l = l.toString().replace(/(\d+)(\d{3})/, "$1,$2");
340
+ e.unshift(l)
341
+ }
342
+ t.data("counterup-nums", e);
343
+ t.text("0");
344
+ var c = function() {
345
+ t.text(t.data("counterup-nums").shift());
346
+ if (t.data("counterup-nums").length) setTimeout(t.data("counterup-func"), r.delay);
347
+ else {
348
+ delete t.data("counterup-nums");
349
+ t.data("counterup-nums", null);
350
+ t.data("counterup-func", null)
351
+ }
352
+ };
353
+ t.data("counterup-func", c);
354
+ setTimeout(t.data("counterup-func"), r.delay)
355
+ };
356
+ t.waypoint(i, {
357
+ offset: "100%",
358
+ triggerOnce: !0
359
+ })
360
+ })
361
+ }
362
+ })(jQuery);
363
+
364
+ // counter up
365
+
366
+ jQuery('.counter').counterUp({
367
+ delay: 10,
368
+ time: 1000
369
+ });
inc/js/jquery.counterup.min.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ Waypoints - 4.0.0
3
+ Copyright © 2011-2015 Caleb Troughton
4
+ Licensed under the MIT license.
5
+ https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
6
+ */
7
+ !function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s],l=o.oldScroll<a.triggerPoint,h=o.newScroll>=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=y+l-f,h=w<s.oldScroll,p=d.triggerPoint>=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}();
8
+
9
+ /*!
10
+ * jquery.counterup.js 1.0
11
+ *
12
+ * Copyright 2013, Benjamin Intal http://gambit.ph @bfintal
13
+ * Released under the GPL v2 License
14
+ *
15
+ * Date: Nov 26, 2013
16
+ */(function(e){"use strict";e.fn.counterUp=function(t){var n=e.extend({time:400,delay:10},t);return this.each(function(){var t=e(this),r=n,i=function(){var e=[],n=r.time/r.delay,i=t.text(),s=/[0-9]+,[0-9]+/.test(i);i=i.replace(/,/g,"");var o=/^[0-9]+$/.test(i),u=/^[0-9]+\.[0-9]+$/.test(i),a=u?(i.split(".")[1]||[]).length:0;for(var f=n;f>=1;f--){var l=parseInt(i/n*f);u&&(l=parseFloat(i/n*f).toFixed(a));if(s)while(/(\d+)(\d{3})/.test(l.toString()))l=l.toString().replace(/(\d+)(\d{3})/,"$1,$2");e.unshift(l)}t.data("counterup-nums",e);t.text("0");var c=function(){t.text(t.data("counterup-nums").shift());if(t.data("counterup-nums").length)setTimeout(t.data("counterup-func"),r.delay);else{delete t.data("counterup-nums");t.data("counterup-nums",null);t.data("counterup-func",null)}};t.data("counterup-func",c);setTimeout(t.data("counterup-func"),r.delay)};t.waypoint(i,{offset:"100%",triggerOnce:!0})})}})(jQuery);
17
+
18
+
19
+ // counter up
20
+
21
+ jQuery('.counter').counterUp({
22
+ delay: 10,
23
+ time: 1000
24
+ });
inc/startkit/features/section-service.php CHANGED
@@ -81,7 +81,6 @@ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' :
81
  $wp_customize->add_setting( 'service_contents',
82
  array(
83
  'sanitize_callback' => 'startkit_repeater_sanitize',
84
- 'transport' => $selective_refresh,
85
  'default' => json_encode(
86
  array(
87
  array(
81
  $wp_customize->add_setting( 'service_contents',
82
  array(
83
  'sanitize_callback' => 'startkit_repeater_sanitize',
 
84
  'default' => json_encode(
85
  array(
86
  array(
readme.txt CHANGED
@@ -31,6 +31,9 @@ Clever Fox WordPress plugin is licensed under the GPL3 (https://www.gnu.org/lice
31
 
32
 
33
  == Changelog ==
 
 
 
34
  = 1.1.19 =
35
  * Arowana logo Image Added
36
 
31
 
32
 
33
  == Changelog ==
34
+ = 1.1.20 =
35
+ * Envira Theme Functionality Added
36
+
37
  = 1.1.19 =
38
  * Arowana logo Image Added
39