Kadence Themes Toolkit - Version 4.1

Version Description

  • Update: Add Kadence Image processing.
  • Update: Add profile meta boxes.
  • Update: Add extras for ascend support.
Download this release

Release Info

Developer britner
Plugin Icon wp plugin Kadence Themes Toolkit
Version 4.1
Comparing to
See all releases

Code changes from version 4.0 to 4.1

author_box.php ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Author Profile Feilds
3
+ add_action( 'show_user_profile', 'virtue_toolkit_show_extra_profile_fields' );
4
+ add_action( 'edit_user_profile', 'virtue_toolkit_show_extra_profile_fields' );
5
+ function virtue_toolkit_show_extra_profile_fields( $user ) {
6
+ if(current_user_can( 'edit_posts') ) { ?>
7
+ <h3><?php echo __('Extra profile information for author box', 'virtue-toolkit');?></h3>
8
+
9
+ <table class="form-table">
10
+ <tr>
11
+ <th>
12
+ <label for="occupation">
13
+ <?php _e('Occupation', 'virtue-toolkit');?>
14
+ </label>
15
+ </th>
16
+ <td>
17
+ <input type="text" name="occupation" id="occupation" value="<?php echo esc_attr( get_the_author_meta( 'occupation', $user->ID ) ); ?>" class="regular-text" /><br />
18
+ <span class="description"><?php _e('Please enter your Occupation.', 'virtue-toolkit');?></span>
19
+ </td>
20
+ </tr>
21
+ <tr>
22
+ <th>
23
+ <label for="twitter">Twitter</label>
24
+ </th>
25
+ <td>
26
+ <input type="text" name="twitter" id="twitter" value="<?php echo esc_attr( get_the_author_meta( 'twitter', $user->ID ) ); ?>" class="regular-text" /><br />
27
+ <span class="description"><?php _e('Please enter your Twitter username.', 'virtue-toolkit'); ?></span>
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <th>
32
+ <label for="facebook">Facebook</label></th>
33
+ <td>
34
+ <input type="text" name="facebook" id="facebook" value="<?php echo esc_attr( get_the_author_meta( 'facebook', $user->ID ) ); ?>" class="regular-text" /><br />
35
+ <span class="description"><?php _e('Please enter your Facebook url. (be sure to include http://)', 'virtue-toolkit'); ?></span>
36
+ </td>
37
+ </tr>
38
+ <tr>
39
+ <th>
40
+ <label for="google">Google Plus</label>
41
+ </th>
42
+ <td>
43
+ <input type="text" name="google" id="google" value="<?php echo esc_attr( get_the_author_meta( 'google', $user->ID ) ); ?>" class="regular-text" /><br />
44
+ <span class="description"><?php _e('Please enter your Google Plus url. (be sure to include http://)', 'virtue-toolkit'); ?></span>
45
+ </td>
46
+ </tr>
47
+ <tr>
48
+ <th>
49
+ <label for="youtube">YouTube</label>
50
+ </th>
51
+ <td>
52
+ <input type="text" name="youtube" id="youtube" value="<?php echo esc_attr( get_the_author_meta( 'youtube', $user->ID ) ); ?>" class="regular-text" /><br />
53
+ <span class="description"><?php _e('Please enter your YouTube url. (be sure to include http://)', 'virtue-toolkit'); ?></span>
54
+ </td>
55
+ </tr>
56
+ <tr>
57
+ <th>
58
+ <label for="flickr">Flickr</label>
59
+ </th>
60
+ <td>
61
+ <input type="text" name="flickr" id="flickr" value="<?php echo esc_attr( get_the_author_meta( 'flickr', $user->ID ) ); ?>" class="regular-text" /><br />
62
+ <span class="description"><?php _e('Please enter your Flickr url. (be sure to include http://)', 'virtue-toolkit'); ?></span>
63
+ </td>
64
+ </tr>
65
+ <tr>
66
+ <th>
67
+ <label for="vimeo">Vimeo</label>
68
+ </th>
69
+ <td>
70
+ <input type="text" name="vimeo" id="vimeo" value="<?php echo esc_attr( get_the_author_meta( 'vimeo', $user->ID ) ); ?>" class="regular-text" /><br />
71
+ <span class="description"><?php _e('Please enter your Vimeo url. (be sure to include http://)', 'virtue-toolkit'); ?></span>
72
+ </td>
73
+ </tr>
74
+ <tr>
75
+ <th>
76
+ <label for="linkedin">Linkedin</label>
77
+ </th>
78
+ <td>
79
+ <input type="text" name="linkedin" id="linkedin" value="<?php echo esc_attr( get_the_author_meta( 'linkedin', $user->ID ) ); ?>" class="regular-text" /><br />
80
+ <span class="description"><?php _e('Please enter your Linkedin url. (be sure to include http://)', 'virtue-toolkit'); ?></span>
81
+ </td>
82
+ </tr>
83
+ <tr>
84
+ <th>
85
+ <label for="dribbble">Dribbble</label>
86
+ </th>
87
+ <td>
88
+ <input type="text" name="dribbble" id="dribbble" value="<?php echo esc_attr( get_the_author_meta( 'dribbble', $user->ID ) ); ?>" class="regular-text" /><br />
89
+ <span class="description"><?php _e('Please enter your Dribbble url. (be sure to include http://)', 'virtue-toolkit'); ?></span>
90
+ </td>
91
+ </tr>
92
+ <tr>
93
+ <th>
94
+ <label for="pinterest">Pinterest</label>
95
+ </th>
96
+ <td>
97
+ <input type="text" name="pinterest" id="pinterest" value="<?php echo esc_attr( get_the_author_meta( 'pinterest', $user->ID ) ); ?>" class="regular-text" /><br />
98
+ <span class="description"><?php _e('Please enter your Pinterest url. (be sure to include http://)', 'virtue-toolkit'); ?></span>
99
+ </td>
100
+ </tr>
101
+ <tr>
102
+ <th>
103
+ <label for="instagram">Instagram</label>
104
+ </th>
105
+ <td>
106
+ <input type="text" name="instagram" id="instagram" value="<?php echo esc_attr( get_the_author_meta( 'instagram', $user->ID ) ); ?>" class="regular-text" /><br />
107
+ <span class="description"><?php _e('Please enter your Instagram url. (be sure to include http://)', 'virtue-toolkit'); ?></span>
108
+ </td>
109
+ </tr>
110
+ </table>
111
+ <?php
112
+ }
113
+ }
114
+
115
+ add_action( 'personal_options_update', 'virtue_toolkit_save_extra_profile_fields' );
116
+ add_action( 'edit_user_profile_update', 'virtue_toolkit_save_extra_profile_fields' );
117
+
118
+ function virtue_toolkit_save_extra_profile_fields( $user_id ) {
119
+ if ( !current_user_can( 'edit_user', $user_id ) )
120
+ return false;
121
+ if(isset($_POST['occupation'])){
122
+ update_user_meta( $user_id, 'occupation', wp_filter_post_kses($_POST['occupation']) );
123
+ }
124
+ if(isset($_POST['twitter'])) {
125
+ update_user_meta( $user_id, 'twitter', sanitize_title(wp_unslash($_POST['twitter']) ));
126
+ }
127
+ if(isset($_POST['facebook'])) {
128
+ update_user_meta( $user_id, 'facebook', esc_url_raw($_POST['facebook']) );
129
+ }
130
+ if(isset($_POST['google'])) {
131
+ update_user_meta( $user_id, 'google', esc_url_raw($_POST['google']) );
132
+ }
133
+ if(isset($_POST['youtube'])) {
134
+ update_user_meta( $user_id, 'youtube', esc_url_raw($_POST['youtube']) );
135
+ }
136
+ if(isset($_POST['flickr'])) {
137
+ update_user_meta( $user_id, 'flickr', esc_url_raw($_POST['flickr']) );
138
+ }
139
+ if(isset($_POST['vimeo'])) {
140
+ update_user_meta( $user_id, 'vimeo', esc_url_raw($_POST['vimeo']) );
141
+ }
142
+ if(isset($_POST['linkedin'])) {
143
+ update_user_meta( $user_id, 'linkedin', esc_url_raw($_POST['linkedin']) );
144
+ }
145
+ if(isset($_POST['dribbble'])) {
146
+ update_user_meta( $user_id, 'dribbble', esc_url_raw($_POST['dribbble']) );
147
+ }
148
+ if(isset($_POST['pinterest'])) {
149
+ update_user_meta( $user_id, 'pinterest', esc_url_raw($_POST['pinterest']) );
150
+ }
151
+ if(isset($_POST['instagram'])) {
152
+ update_user_meta( $user_id, 'instagram', esc_url_raw($_POST['instagram']) );
153
+ }
154
+ }
gallery.php CHANGED
@@ -1,21 +1,10 @@
1
  <?php
2
-
3
- if(!class_exists('KT_Toolkit_Aq_Resize')) {
4
- class KT_Tool_Aq_Exception extends Exception {}
5
-
6
- class KT_Toolkit_Aq_Resize
7
- {
8
  /**
9
  * The singleton instance
10
  */
11
  static private $instance = null;
12
-
13
- /**
14
- * Should an Aq_Exception be thrown on error?
15
- * If false (default), then the error will just be logged.
16
- */
17
- public $throwOnError = false;
18
-
19
  /**
20
  * No initialization allowed
21
  */
@@ -34,441 +23,309 @@ if(!class_exists('KT_Toolkit_Aq_Resize')) {
34
  return self::$instance;
35
  }
36
 
37
- /**
38
- * Run, forest.
39
- */
40
- public function process( $url, $width = null, $height = null, $crop = null, $single = true, $upscale = false ) {
41
- try {
42
- // Validate inputs.
43
- if (!$url)
44
- throw new KT_Tool_Aq_Exception('$url parameter is required');
45
-
46
- // Caipt'n, ready to hook.
47
- if ( true === $upscale ) add_filter( 'image_resize_dimensions', array($this, 'kt_tool_aq_upscale'), 10, 6 );
48
-
49
- // Define upload path & dir.
50
- $upload_info = wp_upload_dir();
51
- $upload_dir = $upload_info['basedir'];
52
- $upload_url = $upload_info['baseurl'];
53
-
54
- $http_prefix = "http://";
55
- $https_prefix = "https://";
56
- $relative_prefix = "//"; // The protocol-relative URL
57
-
58
- /* if the $url scheme differs from $upload_url scheme, make them match
59
- if the schemes differe, images don't show up. */
60
- if(!strncmp($url,$https_prefix,strlen($https_prefix))){ //if url begins with https:// make $upload_url begin with https:// as well
61
- $upload_url = str_replace($http_prefix,$https_prefix,$upload_url);
62
- }
63
- elseif(!strncmp($url,$http_prefix,strlen($http_prefix))){ //if url begins with http:// make $upload_url begin with http:// as well
64
- $upload_url = str_replace($https_prefix,$http_prefix,$upload_url);
65
- }
66
- elseif(!strncmp($url,$relative_prefix,strlen($relative_prefix))){ //if url begins with // make $upload_url begin with // as well
67
- $upload_url = str_replace(array( 0 => "$http_prefix", 1 => "$https_prefix"),$relative_prefix,$upload_url);
68
- }
69
-
70
-
71
- // Check if $img_url is local.
72
- if ( false === strpos( $url, $upload_url ) )
73
- throw new KT_Tool_Aq_Exception('Image must be local: ' . $url);
74
-
75
- // Define path of image.
76
- $rel_path = str_replace( $upload_url, '', $url );
77
- $img_path = $upload_dir . $rel_path;
78
-
79
- // Check if img path exists, and is an image indeed.
80
- if ( ! file_exists( $img_path ) or ! getimagesize( $img_path ) )
81
- throw new KT_Tool_Aq_Exception('Image file does not exist (or is not an image): ' . $img_path);
82
-
83
- // Get image info.
84
- $info = pathinfo( $img_path );
85
- $ext = $info['extension'];
86
- list( $orig_w, $orig_h ) = getimagesize( $img_path );
87
-
88
- // Get image size after cropping.
89
- $dims = image_resize_dimensions( $orig_w, $orig_h, $width, $height, $crop );
90
- $dst_w = $dims[4];
91
- $dst_h = $dims[5];
92
-
93
- // Return the original image only if it exactly fits the needed measures.
94
- if ( ! $dims && ( ( ( null === $height && $orig_w == $width ) xor ( null === $width && $orig_h == $height ) ) xor ( $height == $orig_h && $width == $orig_w ) ) ) {
95
- $img_url = $url;
96
- $dst_w = $orig_w;
97
- $dst_h = $orig_h;
98
- } else {
99
- // Use this to check if cropped image already exists, so we can return that instead.
100
- $suffix = "{$dst_w}x{$dst_h}";
101
- $dst_rel_path = str_replace( '.' . $ext, '', $rel_path );
102
- $destfilename = "{$upload_dir}{$dst_rel_path}-{$suffix}.{$ext}";
103
-
104
- if ( ! $dims || ( true == $crop && false == $upscale && ( $dst_w < $width || $dst_h < $height ) ) ) {
105
- // Can't resize, so return false saying that the action to do could not be processed as planned.
106
- throw new KT_Tool_Aq_Exception('Unable to resize image because image_resize_dimensions() failed');
107
- }
108
- // Else check if cache exists.
109
- elseif ( file_exists( $destfilename ) && getimagesize( $destfilename ) ) {
110
- $img_url = "{$upload_url}{$dst_rel_path}-{$suffix}.{$ext}";
111
- }
112
- // Else, we resize the image and return the new resized image url.
113
- else {
114
-
115
- $editor = wp_get_image_editor( $img_path );
116
-
117
- if ( is_wp_error( $editor ) || is_wp_error( $editor->resize( $width, $height, $crop ) ) ) {
118
- throw new KT_Tool_Aq_Exception('Unable to get WP_Image_Editor: (is GD or ImageMagick installed?)');
119
- }
120
-
121
- $resized_file = $editor->save();
122
-
123
- if ( ! is_wp_error( $resized_file ) ) {
124
- $resized_rel_path = str_replace( $upload_dir, '', $resized_file['path'] );
125
- $img_url = $upload_url . $resized_rel_path;
126
- } else {
127
- throw new KT_Tool_Aq_Exception('Unable to save resized image file.');
128
- }
129
-
130
- }
131
- }
132
-
133
- // Okay, leave the ship.
134
- if ( true === $upscale ) remove_filter( 'image_resize_dimensions', array( $this, 'kt_tool_aq_upscale' ) );
135
-
136
- // Return the output.
137
- if ( $single ) {
138
- // str return.
139
- $image = $img_url;
140
- } else {
141
- // array return.
142
- $image = array (
143
- 0 => $img_url,
144
- 1 => $dst_w,
145
- 2 => $dst_h
146
- );
147
- }
148
-
149
- // RETINA Support --------------------------------------------------------------->
150
- if ( apply_filters( 'kadence_retina_support', true ) ) :
151
- $retina_w = $dst_w*2;
152
- $retina_h = $dst_h*2;
153
-
154
- //get image size after cropping
155
- $dims_x2 = image_resize_dimensions($orig_w, $orig_h, $retina_w, $retina_h, $crop);
156
- $dst_x2_w = $dims_x2[4];
157
- $dst_x2_h = $dims_x2[5];
158
-
159
- // If possible lets make the @2x image
160
- if($dst_x2_h) {
161
-
162
- if (true == $crop && ( $dst_x2_w < $retina_w || $dst_x2_h < $retina_h ) ) {
163
- // do nothing
164
- } else {
165
-
166
- $x2suffix = "{$dst_x2_w}x{$dst_x2_h}";
167
- //@2x image url
168
- $destfilename = "{$upload_dir}{$dst_rel_path}-{$x2suffix}.{$ext}";
169
-
170
- //check if retina image exists
171
- if(file_exists($destfilename) && getimagesize($destfilename)) {
172
- // already exists, do nothing
173
- } else {
174
- // doesnt exist, lets create it
175
- $editor = wp_get_image_editor($img_path);
176
- if ( ! is_wp_error( $editor ) ) {
177
- $editor->resize( $retina_w, $retina_h, true );
178
- $editor = $editor->save();
179
- }
180
- }
181
- }
182
-
183
- }
184
- endif;
185
-
186
- return $image;
187
- }
188
- catch (KT_Tool_Aq_Exception $ex) {
189
- //error_log('Aq_Resize.process() error: ' . $ex->getMessage());
190
-
191
- if ($this->throwOnError) {
192
- // Bubble up exception.
193
- throw $ex;
194
- }
195
- else {
196
- // Return false, so that this patch is backwards-compatible.
197
- return false;
198
- }
199
- }
200
- }
201
-
202
- /**
203
- * Callback to overwrite WP computing of thumbnail measures
204
- */
205
- function kt_tool_aq_upscale( $default, $orig_w, $orig_h, $dest_w, $dest_h, $crop ) {
206
- if ( ! $crop ) return null; // Let the wordpress default function handle this.
207
-
208
- // Here is the point we allow to use larger image size than the original one.
209
- $aspect_ratio = $orig_w / $orig_h;
210
- $new_w = $dest_w;
211
- $new_h = $dest_h;
212
-
213
- if ( ! $new_w ) {
214
- $new_w = intval( $new_h * $aspect_ratio );
215
- }
216
-
217
- if ( ! $new_h ) {
218
- $new_h = intval( $new_w / $aspect_ratio );
219
- }
220
-
221
- $size_ratio = max( $new_w / $orig_w, $new_h / $orig_h );
222
-
223
- $crop_w = round( $new_w / $size_ratio );
224
- $crop_h = round( $new_h / $size_ratio );
225
 
226
- $s_x = floor( ( $orig_w - $crop_w ) / 2 );
227
- $s_y = floor( ( $orig_h - $crop_h ) / 2 );
 
 
 
 
228
 
229
- return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h );
230
- }
231
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  }
233
 
234
-
235
-
236
-
237
-
238
- if(!function_exists('kt_toolkit_aq_resize')) {
239
- function kt_toolkit_aq_resize( $url, $width = null, $height = null, $crop = null, $single = true, $upscale = false, $id = null ) {
240
- if( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) {
241
- if(empty($height) ) {
242
- $args = array( 'w' => $width );
243
- if(!empty($id)) {
244
- $image_attributes = wp_get_attachment_image_src ( $id, 'full' );
245
- $sizes = image_resize_dimensions($image_attributes[1], $image_attributes[2], $width, null, false );
246
- $height = $sizes[5];
247
- } else {
248
- $height = null;
249
- }
250
- } else if(empty($width) ) {
251
- $args = array( 'h' => $height );
252
- if(!empty($id)) {
253
- $image_attributes = wp_get_attachment_image_src ( $id, 'full' );
254
- $sizes = image_resize_dimensions($image_attributes[1], $image_attributes[2], null, $height, false );
255
- $width = $sizes[4];
256
- } else {
257
- $width = null;
258
- }
259
- } else {
260
- $args = array( 'resize' => $width . ',' . $height );
261
- }
262
- if ( $single ) {
263
- // str return.
264
- $image = jetpack_photon_url( $url, $args );
265
- } else {
266
- // array return.
267
- $image = array (
268
- 0 => jetpack_photon_url( $url, $args ),
269
- 1 => $width,
270
- 2 => $height
271
- );
272
- }
273
- return $image;
274
- } else {
275
- $kt_tool_aq_resize = KT_Toolkit_Aq_Resize::getInstance();
276
- return $kt_tool_aq_resize->process( $url, $width, $height, $crop, $single, $upscale );
277
- }
278
- }
279
- }
280
- function kt_toolkit_get_srcset($width,$height,$url,$id) {
281
- if(empty($id) || empty($url)) {
282
- return;
283
- }
284
-
285
- $image_meta = get_post_meta( $id, '_wp_attachment_metadata', true );
286
- if(empty($image_meta['file'])){
287
- return;
288
- }
289
- // If possible add in our images on the fly sizes
290
- $ext = substr($image_meta['file'], strrpos($image_meta['file'], "."));
291
- $pathflyfilename = str_replace($ext,'-'.$width.'x'.$height.'' . $ext, $image_meta['file']);
292
- $retina_w = $width*2;
293
- $retina_h = $height*2;
294
- $pathretinaflyfilename = str_replace($ext, '-'.$retina_w.'x'.$retina_h.'' . $ext, $image_meta['file']);
295
- $flyfilename = basename($image_meta['file'], $ext) . '-'.$width.'x'.$height.'' . $ext;
296
- $retinaflyfilename = basename($image_meta['file'], $ext) . '-'.$retina_w.'x'.$retina_h.'' . $ext;
297
-
298
- $upload_info = wp_upload_dir();
299
- $upload_dir = $upload_info['basedir'];
300
-
301
- $flyfile = trailingslashit($upload_dir).$pathflyfilename;
302
- $retinafile = trailingslashit($upload_dir).$pathretinaflyfilename;
303
- if(empty($image_meta['sizes']) ){ $image_meta['sizes'] = array();}
304
- if (file_exists($flyfile)) {
305
- $kt_add_imagesize = array(
306
- 'kt_on_fly' => array(
307
- 'file'=> $flyfilename,
308
- 'width' => $width,
309
- 'height' => $height,
310
- 'mime-type' => isset($image_meta['sizes']['thumbnail']) ? $image_meta['sizes']['thumbnail']['mime-type'] : '',
311
- )
312
- );
313
- $image_meta['sizes'] = array_merge($image_meta['sizes'], $kt_add_imagesize);
314
  }
315
- if (file_exists($retinafile)) {
316
- $kt_add_imagesize_retina = array(
317
- 'kt_on_fly_retina' => array(
318
- 'file'=> $retinaflyfilename,
319
- 'width' => $retina_w,
320
- 'height' => $retina_h,
321
- 'mime-type' => isset($image_meta['sizes']['thumbnail']) ? $image_meta['sizes']['thumbnail']['mime-type'] : '',
322
- )
323
- );
324
- $image_meta['sizes'] = array_merge($image_meta['sizes'], $kt_add_imagesize_retina);
325
- }
326
- if(function_exists ( 'wp_calculate_image_srcset') ){
327
- $output = wp_calculate_image_srcset(array( $width, $height), $url, $image_meta, $id);
328
- } else {
329
- $output = '';
330
- }
331
- return $output;
332
- }
333
- function kt_toolkit_get_srcset_output($width,$height,$url,$id) {
334
- $img_srcset = kt_toolkit_get_srcset( $width, $height, $url, $id);
335
- if(!empty($img_srcset) ) {
336
- $output = 'srcset="'.esc_attr($img_srcset).'" sizes="(max-width: '.esc_attr($width).'px) 100vw, '.esc_attr($width).'px"';
337
  } else {
338
- $output = '';
 
 
 
 
 
 
 
 
339
  }
340
- return $output;
 
341
  }
342
  /**
343
  *
344
  * Re-create the [gallery] shortcode and use thumbnails styling from kadencethemes
345
  *
346
  */
347
- function kadence_shortcode_gallery($attr) {
348
- $post = get_post();
349
- static $instance = 0;
350
- $instance++;
351
-
352
- if (!empty($attr['ids'])) {
353
- if (empty($attr['orderby'])) {
354
- $attr['orderby'] = 'post__in';
355
- }
356
- $attr['include'] = $attr['ids'];
357
- }
358
 
359
- $output = apply_filters('post_gallery', '', $attr);
360
 
361
- if ($output != '') {
362
- return $output;
363
- }
364
 
365
- if (isset($attr['orderby'])) {
366
- $attr['orderby'] = sanitize_sql_orderby($attr['orderby']);
367
- if (!$attr['orderby']) {
368
- unset($attr['orderby']);
369
- }
370
- }
371
 
372
- extract(shortcode_atts(array(
373
- 'order' => 'ASC',
374
- 'orderby' => 'menu_order ID',
375
- 'id' => $post->ID,
376
- 'itemtag' => '',
377
- 'icontag' => '',
378
- 'captiontag' => '',
379
- 'columns' => 3,
380
- 'link' => 'file',
381
- 'size' => 'full',
382
- 'include' => '',
383
- 'attachment_page' => 'false',
384
- 'use_image_alt' => 'false',
385
- 'gallery_id' => (rand(10,100)),
386
- 'lightboxsize' => 'full',
387
- 'exclude' => ''
388
- ), $attr));
389
-
390
- $id = intval($id);
391
-
392
- if ($order === 'RAND') {
393
- $orderby = 'none';
394
- }
395
 
396
- $gallery_rn = (rand(10,100));
397
 
398
- if (!empty($include)) {
399
- $_attachments = get_posts(array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby));
 
400
 
401
- $attachments = array();
402
- foreach ($_attachments as $key => $val) {
403
- $attachments[$val->ID] = $_attachments[$key];
404
- }
405
- } elseif (!empty($exclude)) {
406
- $attachments = get_children(array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby));
407
- } else {
408
- $attachments = get_children(array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby));
409
- }
410
 
411
- if (empty($attachments)) {
412
- return '';
413
- }
414
 
415
- if (is_feed()) {
416
- $output = "\n";
417
- foreach ($attachments as $att_id => $attachment) {
418
- $output .= wp_get_attachment_link($att_id, $size, true) . "\n";
419
- }
420
- return $output;
421
- }
 
 
422
 
423
- if ($columns == '2') {
424
- $itemsize = 'tcol-lg-6 tcol-md-6 tcol-sm-6 tcol-xs-12 tcol-ss-12'; $imgsize = 600;
425
- } else if ($columns == '1') {
426
- $itemsize = 'tcol-lg-12 tcol-md-12 tcol-sm-12 tcol-xs-12 tcol-ss-12'; $imgsize = 1200;
427
- } else if ($columns == '3'){
428
- $itemsize = 'tcol-lg-4 tcol-md-4 tcol-sm-4 tcol-xs-6 tcol-ss-12'; $imgsize = 400;
429
- } else if ($columns == '6'){
430
- $itemsize = 'tcol-lg-2 tcol-md-2 tcol-sm-3 tcol-xs-4 tcol-ss-6'; $imgsize = 300;
431
- } else if ($columns == '8' || $columns == '9' || $columns == '7'){
432
- $itemsize = 'tcol-lg-2 tcol-md-2 tcol-sm-3 tcol-xs-4 tcol-ss-4'; $imgsize = 260;
433
- } else if ($columns == '12' || $columns == '11'){
434
- $itemsize = 'tcol-lg-1 tcol-md-1 tcol-sm-2 tcol-xs-2 tcol-ss-3'; $imgsize = 240;
435
- } else if ($columns == '5'){
436
- $itemsize = 'tcol-lg-25 tcol-md-25 tcol-sm-3 tcol-xs-4 tcol-ss-6'; $imgsize = 300;
437
- } else {
438
- $itemsize = 'tcol-lg-3 tcol-md-3 tcol-sm-4 tcol-xs-6 tcol-ss-12'; $imgsize = 300;
439
- }
440
 
441
- $output .= '<div id="kad-wp-gallery'.esc_attr($gallery_rn).'" class="kad-wp-gallery kad-light-wp-gallery clearfix kt-gallery-column-'.esc_attr($columns).' rowtight">';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
442
 
443
- $i = 0;
444
- foreach ($attachments as $id => $attachment) {
445
- $attachment_url = wp_get_attachment_url($id);
446
- $image = kt_toolkit_aq_resize($attachment_url, $imgsize, $imgsize, true, false, false, $id);
447
- if(empty($image[0])) {$image = array($attachment_url,$imgsize,$imgsize);}
448
- $img_srcset_output = kt_toolkit_get_srcset_output( $image[1], $image[2], $attachment_url, $id);
449
- if($lightboxsize != 'full') {
450
- $attachment_url = wp_get_attachment_image_src( $id, $lightboxsize);
451
- $attachment_url = $attachment_url[0];
452
- }
453
- $lightbox_data = 'data-rel="lightbox"';
454
- if($link == 'attachment_page' || $attachment_page == 'true') {
455
- $attachment_url = get_permalink($id);
456
- $lightbox_data = '';
457
- }
458
- if($use_image_alt == 'true') {
459
- $alt = get_post_meta($id, '_wp_attachment_image_alt', true);
460
- } else {
461
- $alt = $attachment->post_excerpt;
462
- }
463
 
464
- $output .= '<div class="'.esc_attr($itemsize).' g_item"><div class="grid_item kad_gallery_fade_in gallery_item"><a href="'.esc_url($attachment_url).'" '.$lightbox_data.' class="lightboxhover">';
465
- $output .= '<img src="'.esc_url($image[0]).'" width="'.esc_attr($image[1]).'" height="'.esc_attr($image[2]).'" alt="'.esc_attr($alt).'" '.$img_srcset_output.' class="light-dropshaddow"/>';
466
- $output .= '</a>';
467
- $output .= '</div></div>';
468
- }
469
- $output .= '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
470
 
471
- return $output;
472
  }
473
  add_action('init', 'kt_tool_gallery_setup_init');
474
  function kt_tool_gallery_setup_init() {
@@ -477,7 +334,7 @@ function kt_tool_gallery_setup_init() {
477
  if(! function_exists( 'kadence_gallery' ) ) {
478
  if( (isset($pinnacle['pinnacle_gallery']) && $pinnacle['pinnacle_gallery'] == '1') || (isset($virtue['virtue_gallery']) && $virtue['virtue_gallery'] == '1') ) {
479
  remove_shortcode('gallery');
480
- add_shortcode('gallery', 'kadence_shortcode_gallery');
481
  }
482
  }
483
  }
@@ -578,15 +435,16 @@ function kt_toolkit_shortcode_gallery($attr) {
578
 
579
  $i = 0;
580
  foreach ($attachments as $id => $attachment) {
581
- $attachment_src = wp_get_attachment_image_src($id, 'full');
582
- $attachment_url = $attachment_src[0];
583
-
584
- $image = kt_toolkit_aq_resize($attachment_src[0], $imgsize, $imgsize, true, false, false, $id);
585
-
586
- if(empty($image[0])) {
587
- $image = $attachment_src[0];
588
- }
589
- $img_srcset_output = kt_toolkit_get_srcset_output( $image[1], $image[2], $attachment_url, $id);
 
590
  if($lightboxsize != 'full') {
591
  $attachment_lb = wp_get_attachment_image_src( $id, $lightboxsize);
592
  $attachment_url = $attachment_lb[0];
@@ -596,23 +454,17 @@ function kt_toolkit_shortcode_gallery($attr) {
596
  $attachment_url = get_permalink($id);
597
  $lightbox_data = '';
598
  }
599
- // Get alt or caption for alt
600
- if($use_image_alt == 'true') {
601
- $alt = get_post_meta($id, '_wp_attachment_image_alt', true);
602
- } else {
603
- $alt = $attachment->post_excerpt;
604
- }
605
 
606
- $paddingbtn = ($image[2]/$image[1]) * 100;
607
- $output .= '<div class="'.$itemsize.' g_item"><div class="grid_item gallery_item">';
608
  if($link != 'none') {
609
  $output .='<a href="'.esc_url($attachment_url).'" '.$lightbox_data.' class="gallery-link">';
610
  }
611
- $output .= '<div class="kt-intrinsic" style="padding-bottom:'.$paddingbtn.'%;" itemprop="image" itemscope itemtype="http://schema.org/ImageObject">';
612
- $output .= '<img src="'.esc_url($image[0]).'" width="'.esc_attr($image[1]).'" height="'.esc_attr($image[2]).'" alt="'.esc_attr($alt).'" '.$img_srcset_output.' itemprop="contentUrl" class="kt-gallery-img"/>';
613
- $output .= '<meta itemprop="url" content="'.esc_url($image[0]).'">';
614
- $output .= '<meta itemprop="width" content="'.esc_attr($image[1]).'">';
615
- $output .= '<meta itemprop="height" content="'.esc_attr($image[2]).'>">';
616
  $output .= '</div>';
617
  if (trim($attachment->post_excerpt) && $caption == 'true') {
618
  $output .= '<div class="photo-caption-bg"></div>';
1
  <?php
2
+ if ( ! class_exists( 'Kadence_Toolkit_Get_Image' ) ) {
3
+ class Kadence_Toolkit_Get_Image {
 
 
 
 
4
  /**
5
  * The singleton instance
6
  */
7
  static private $instance = null;
 
 
 
 
 
 
 
8
  /**
9
  * No initialization allowed
10
  */
23
  return self::$instance;
24
  }
25
 
26
+ public function process($id = null, $width = null, $height = null) {
27
+ // return if no ID
28
+ if(empty($id)) {
29
+ return false;
30
+ }
31
+ // return with orginal if no width or height set.
32
+ if(empty($width) && empty($height) ) {
33
+ return self::toolkit_get_full_image($id);
34
+ }
35
+ // Find width or height if one or the other is not set.
36
+ $org_height = true;
37
+ if(empty($height) ) {
38
+ $org_height = false;
39
+ $image_attributes = wp_get_attachment_image_src( $id, 'full' );
40
+ $sizes = image_resize_dimensions($image_attributes[1], $image_attributes[2], $width, null, false );
41
+ $height = $sizes[5];
42
+ } else if(empty($width) ) {
43
+ $image_attributes = wp_get_attachment_image_src( $id, 'full' );
44
+ $sizes = image_resize_dimensions($image_attributes[1], $image_attributes[2], null, $height, false );
45
+ $width = $sizes[4];
46
+ }
47
+ // Now we checked for an ID, made sure the width and height have values lets check if we can make the size at all
48
+ if ( self::toolkit_image_size_larger_than_original( $id, $width, $height ) ) {
49
+ return self::toolkit_get_full_image($id);
50
+ }
51
+ //Check for jetpack
52
+ if( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) {
53
+ $args = array( 'resize' => $width . ',' . $height );
54
+ $image = array (
55
+ 0 => jetpack_photon_url( wp_get_attachment_image_url($id, 'full'), $args ),
56
+ 1 => $width,
57
+ 2 => $height,
58
+ 3 => '',
59
+ 4 => $id
60
+ );
61
+ } else if( self::toolkit_image_size_already_exists( $id, $width, $height ) ) {
62
+
63
+ return self::toolkit_get_image_at_size($id, $width, $height );
64
+
65
+ } else if(class_exists( 'Kadence_Image_Processing' )) {
66
+ // lets process the image
67
+ $Kadence_Image_Processing = Kadence_Image_Processing::getInstance();
68
+ $created = $Kadence_Image_Processing->process($id, $width, $height);
69
+ if($created) {
70
+ return self::toolkit_get_image_at_size($id, $width, $height );
71
+ } else {
72
+ return self::toolkit_get_full_image($id);
73
+ }
74
+ } else {
75
+ return self::toolkit_get_full_image($id);
76
+ }
77
+ }
78
+ public static function toolkit_get_image_srcset($id = null, $url = null, $width = null, $height = null) {
79
+ if(empty($id) || empty($url) || empty($width) || empty($height)) {
80
+ return false;
81
+ }
82
+
83
+ $image_meta = self::toolkit_get_image_meta($id);
84
+ if ( ! $image_meta ) {
85
+ return false;
86
+ }
87
+
88
+ if(function_exists ( 'wp_calculate_image_srcset') ){
89
+ $output = wp_calculate_image_srcset(array( $width, $height), $url, $image_meta, $id);
90
+ } else {
91
+ $output = '';
92
+ }
93
+
94
+ return $output;
95
+ }
96
+ public static function toolkit_get_srcset_output($id = null, $url = null, $width = null, $height = null) {
97
+ $img_srcset = self::toolkit_get_image_srcset($id, $url, $width, $height);
98
+ if(!empty($img_srcset) ) {
99
+ $output = 'srcset="'.esc_attr($img_srcset).'" sizes="(max-width: '.esc_attr($width).'px) 100vw, '.esc_attr($width).'px"';
100
+ } else {
101
+ $output = '';
102
+ }
103
+ return $output;
104
+ }
105
+ public static function toolkit_image_size_larger_than_original($id, $width, $height) {
106
+ $image_meta = self::toolkit_get_image_meta( $id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
 
108
+ if ( ! isset( $image_meta['width'] ) || ! isset( $image_meta['height'] ) ) {
109
+ return true;
110
+ }
111
+ if ( $width > $image_meta['width'] || $height > $image_meta['height'] ) {
112
+ return true;
113
+ }
114
 
115
+ return false;
116
+ }
117
+ public static function toolkit_get_full_image($id) {
118
+ $src = wp_get_attachment_image_src($id, 'full' );
119
+ // array return.
120
+ $image = array (
121
+ 0 => $src[0],
122
+ 1 => $src[1],
123
+ 2 => $src[2],
124
+ 3 => self::toolkit_get_srcset_output($id, $src[0], $src[1], $src[2]),
125
+ 4 => $src[0],
126
+ 5 => $id
127
+ );
128
+ return $image;
129
+ }
130
+ public static function toolkit_get_image_at_size($id, $width, $height) {
131
+ $size = array(
132
+ 0 => $width,
133
+ 1 => $height
134
+ );
135
+ $src = wp_get_attachment_image_src($id, $size );
136
+ $full = wp_get_attachment_image_url($id, 'full' );
137
+ // array return.
138
+ $image = array (
139
+ 0 => $src[0],
140
+ 1 => $src[1],
141
+ 2 => $src[2],
142
+ 3 => self::toolkit_get_srcset_output($id, $src[0], $src[1], $src[2]),
143
+ 4 => $full,
144
+ 5 => $id
145
+ );
146
+ return $image;
147
+ }
148
+ public static function toolkit_get_image_meta( $id ) {
149
+ return wp_get_attachment_metadata( $id );
150
+ }
151
+ public static function toolkit_image_size_already_exists( $id, $width, $height ) {
152
+ $image_meta = self::toolkit_get_image_meta( $id );
153
+ $kip_size_name = self::kip_get_size_name( array( $width, $height ));
154
+ if(isset( $image_meta['sizes'][ $kip_size_name ] ) ) {
155
+ return true;
156
+ } else {
157
+ return false;
158
+ }
159
+ }
160
+ public static function kip_get_size_name( $size ) {
161
+ return 'kip-' . $size[0] . 'x' . $size[1];
162
+ }
163
+ }
164
  }
165
 
166
+ function kadence_toolkit_get_image_array($width = null, $height = null, $crop = true, $class = null, $alt = null, $id = null) {
167
+ if(empty($id)) {
168
+ $id = get_post_thumbnail_id();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  }
170
+ if(!empty($id)) {
171
+ $Kadence_Toolkit_Get_Image = Kadence_Toolkit_Get_Image::getInstance();
172
+ $image = $Kadence_Toolkit_Get_Image->process( $id, $width, $height);
173
+ if(empty($alt)) {
174
+ $alt = get_post_meta($id, '_wp_attachment_image_alt', true);
175
+ }
176
+ $return_array = array(
177
+ 'src' => $image[0],
178
+ 'width' => $image[1],
179
+ 'height' => $image[2],
180
+ 'srcset' => $image[3],
181
+ 'class' => $class,
182
+ 'alt' => $alt,
183
+ 'full' => $image[4],
184
+ );
 
 
 
 
 
 
 
185
  } else {
186
+ $return_array = array(
187
+ 'src' => '',
188
+ 'width' => '',
189
+ 'height' => '',
190
+ 'srcset' => '',
191
+ 'class' => '',
192
+ 'alt' => '',
193
+ 'full' => '',
194
+ );
195
  }
196
+
197
+ return $return_array;
198
  }
199
  /**
200
  *
201
  * Re-create the [gallery] shortcode and use thumbnails styling from kadencethemes
202
  *
203
  */
204
+ function kadence_toolkit_shortcode_gallery($attr) {
205
+ $post = get_post();
206
+ static $instance = 0;
207
+ $instance++;
208
+
209
+ if (!empty($attr['ids'])) {
210
+ if (empty($attr['orderby'])) {
211
+ $attr['orderby'] = 'post__in';
212
+ }
213
+ $attr['include'] = $attr['ids'];
214
+ }
215
 
216
+ $output = apply_filters('post_gallery', '', $attr);
217
 
218
+ if ($output != '') {
219
+ return $output;
220
+ }
221
 
222
+ if (isset($attr['orderby'])) {
223
+ $attr['orderby'] = sanitize_sql_orderby($attr['orderby']);
224
+ if (!$attr['orderby']) {
225
+ unset($attr['orderby']);
226
+ }
227
+ }
228
 
229
+ extract(shortcode_atts(array(
230
+ 'order' => 'ASC',
231
+ 'orderby' => 'menu_order ID',
232
+ 'id' => $post->ID,
233
+ 'itemtag' => '',
234
+ 'icontag' => '',
235
+ 'captiontag' => '',
236
+ 'columns' => 3,
237
+ 'link' => 'file',
238
+ 'size' => 'full',
239
+ 'include' => '',
240
+ 'attachment_page' => 'false',
241
+ 'use_image_alt' => 'false',
242
+ 'gallery_id' => (rand(10,100)),
243
+ 'lightboxsize' => 'full',
244
+ 'exclude' => ''
245
+ ), $attr));
 
 
 
 
 
 
246
 
247
+ $id = intval($id);
248
 
249
+ if ($order === 'RAND') {
250
+ $orderby = 'none';
251
+ }
252
 
253
+ $gallery_rn = (rand(10,100));
 
 
 
 
 
 
 
 
254
 
255
+ if (!empty($include)) {
256
+ $_attachments = get_posts(array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby));
 
257
 
258
+ $attachments = array();
259
+ foreach ($_attachments as $key => $val) {
260
+ $attachments[$val->ID] = $_attachments[$key];
261
+ }
262
+ } elseif (!empty($exclude)) {
263
+ $attachments = get_children(array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby));
264
+ } else {
265
+ $attachments = get_children(array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby));
266
+ }
267
 
268
+ if (empty($attachments)) {
269
+ return '';
270
+ }
271
+
272
+ if (is_feed()) {
273
+ $output = "\n";
274
+ foreach ($attachments as $att_id => $attachment) {
275
+ $output .= wp_get_attachment_link($att_id, $size, true) . "\n";
276
+ }
277
+ return $output;
278
+ }
 
 
 
 
 
 
279
 
280
+ if ($columns == '2') {
281
+ $itemsize = 'tcol-lg-6 tcol-md-6 tcol-sm-6 tcol-xs-12 tcol-ss-12'; $imgsize = 600;
282
+ } else if ($columns == '1') {
283
+ $itemsize = 'tcol-lg-12 tcol-md-12 tcol-sm-12 tcol-xs-12 tcol-ss-12'; $imgsize = 1200;
284
+ } else if ($columns == '3'){
285
+ $itemsize = 'tcol-lg-4 tcol-md-4 tcol-sm-4 tcol-xs-6 tcol-ss-12'; $imgsize = 400;
286
+ } else if ($columns == '6'){
287
+ $itemsize = 'tcol-lg-2 tcol-md-2 tcol-sm-3 tcol-xs-4 tcol-ss-6'; $imgsize = 300;
288
+ } else if ($columns == '8' || $columns == '9' || $columns == '7'){
289
+ $itemsize = 'tcol-lg-2 tcol-md-2 tcol-sm-3 tcol-xs-4 tcol-ss-4'; $imgsize = 260;
290
+ } else if ($columns == '12' || $columns == '11'){
291
+ $itemsize = 'tcol-lg-1 tcol-md-1 tcol-sm-2 tcol-xs-2 tcol-ss-3'; $imgsize = 240;
292
+ } else if ($columns == '5'){
293
+ $itemsize = 'tcol-lg-25 tcol-md-25 tcol-sm-3 tcol-xs-4 tcol-ss-6'; $imgsize = 300;
294
+ } else {
295
+ $itemsize = 'tcol-lg-3 tcol-md-3 tcol-sm-4 tcol-xs-6 tcol-ss-12'; $imgsize = 300;
296
+ }
297
+
298
+ $output .= '<div id="kad-wp-gallery'.esc_attr($gallery_rn).'" class="kad-wp-gallery kad-light-wp-gallery clearfix kt-gallery-column-'.esc_attr($columns).' rowtight">';
299
 
300
+ foreach ($attachments as $id => $attachment) {
301
+ if($use_image_alt == 'true') {
302
+ $alt = get_post_meta($id, '_wp_attachment_image_alt', true);
303
+ } else {
304
+ $alt = $attachment->post_excerpt;
305
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
306
 
307
+ $img = kadence_toolkit_get_image_array($imgsize, $imgsize, true, 'light-dropshaddow', $alt, $id);
308
+ $attachment_url = $img['full'];
309
+
310
+ if($lightboxsize != 'full') {
311
+ $attachment_url = wp_get_attachment_image_src( $id, $lightboxsize);
312
+ $attachment_url = $attachment_url[0];
313
+ }
314
+ $lightbox_data = 'data-rel="lightbox"';
315
+ if($link == 'attachment_page' || $attachment_page == 'true') {
316
+ $attachment_url = get_permalink($id);
317
+ $lightbox_data = '';
318
+ }
319
+
320
+ $output .= '<div class="'.esc_attr($itemsize).' g_item"><div class="grid_item kad_gallery_fade_in gallery_item">';
321
+ $output .= '<a href="'.esc_url($attachment_url).'" '.$lightbox_data.' class="lightboxhover">';
322
+ $output .= '<img src="'.esc_url($img['src']).'" width="'.esc_attr($img['width']).'" height="'.esc_attr($img['height']).'" alt="'.esc_attr($img['alt']).'" '.$img['srcset'].' class="'.$img['class'].'"/>';
323
+ $output .= '</a>';
324
+ $output .= '</div></div>';
325
+ }
326
+ $output .= '</div>';
327
 
328
+ return $output;
329
  }
330
  add_action('init', 'kt_tool_gallery_setup_init');
331
  function kt_tool_gallery_setup_init() {
334
  if(! function_exists( 'kadence_gallery' ) ) {
335
  if( (isset($pinnacle['pinnacle_gallery']) && $pinnacle['pinnacle_gallery'] == '1') || (isset($virtue['virtue_gallery']) && $virtue['virtue_gallery'] == '1') ) {
336
  remove_shortcode('gallery');
337
+ add_shortcode('gallery', 'kadence_toolkit_shortcode_gallery');
338
  }
339
  }
340
  }
435
 
436
  $i = 0;
437
  foreach ($attachments as $id => $attachment) {
438
+ // Get alt or caption for alt
439
+ if($use_image_alt == 'true') {
440
+ $alt = get_post_meta($id, '_wp_attachment_image_alt', true);
441
+ } else {
442
+ $alt = $attachment->post_excerpt;
443
+ }
444
+
445
+ $img = kadence_toolkit_get_image_array($imgsize, $imgsize, true, 'kt-gallery-img', $alt, $id);
446
+ $attachment_url = $img['full'];
447
+
448
  if($lightboxsize != 'full') {
449
  $attachment_lb = wp_get_attachment_image_src( $id, $lightboxsize);
450
  $attachment_url = $attachment_lb[0];
454
  $attachment_url = get_permalink($id);
455
  $lightbox_data = '';
456
  }
 
 
 
 
 
 
457
 
458
+ $paddingbtn = ($img['height']/$img['width']) * 100;
459
+ $output .= '<div class="'.esc_attr($itemsize).' g_item"><div class="grid_item gallery_item">';
460
  if($link != 'none') {
461
  $output .='<a href="'.esc_url($attachment_url).'" '.$lightbox_data.' class="gallery-link">';
462
  }
463
+ $output .= '<div class="kt-intrinsic" style="padding-bottom:'.esc_attr($paddingbtn).'%;" itemprop="image" itemscope itemtype="http://schema.org/ImageObject">';
464
+ $output .= '<img src="'.esc_url($img['src']).'" width="'.esc_attr($img['width']).'" height="'.esc_attr($img['height']).'" alt="'.esc_attr($img['alt']).'" '.$img['srcset'].' class="'.$img['class'].'" itemprop="contentUrl" />';
465
+ $output .= '<meta itemprop="url" content="'.esc_url($img['src']).'">';
466
+ $output .= '<meta itemprop="width" content="'.esc_attr($img['width']).'">';
467
+ $output .= '<meta itemprop="height" content="'.esc_attr($img['height']).'>">';
468
  $output .= '</div>';
469
  if (trim($attachment->post_excerpt) && $caption == 'true') {
470
  $output .= '<div class="photo-caption-bg"></div>';
kadence_image_processing.php ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit; // Exit if accessed directly
4
+ }
5
+ if ( ! class_exists( 'Kadence_Image_Processing' ) ) {
6
+ class Kadence_Image_Processing_Exception extends Exception {}
7
+ class Kadence_Image_Processing {
8
+ protected static $instance = null;
9
+ private $is_updating_backup_sizes = false;
10
+ public $throwOnError = false;
11
+ /**
12
+ * No cloning allowed
13
+ */
14
+ private function __clone() {}
15
+ /**
16
+ * Singleton
17
+ */
18
+ public static function getInstance() {
19
+ if ( is_null( self::$instance ) ) {
20
+ self::$instance = new self();
21
+ }
22
+ return self::$instance;
23
+ }
24
+ public function __construct() {
25
+ add_filter( 'update_post_metadata', array( $this, 'filter_update_post_metadata' ), 10, 5 );
26
+ }
27
+ /**
28
+ * Filter the post meta data for backup sizes
29
+ *
30
+ * Unfortunately WordPress core is lacking hooks in its image resizing functions so we are reduced
31
+ * to this hackery to detect when images are resized and previous versions are relegated to backup sizes.
32
+ *
33
+ */
34
+ public function filter_update_post_metadata( $check, $object_id, $meta_key, $meta_value, $prev_value ) {
35
+ if ( '_wp_attachment_backup_sizes' !== $meta_key ) {
36
+ return $check;
37
+ }
38
+
39
+ $current_value = get_post_meta( $object_id, $meta_key, true );
40
+
41
+ if ( ! $current_value ) {
42
+ $current_value = array();
43
+ }
44
+
45
+ $diff = array_diff_key( $meta_value, $current_value );
46
+
47
+ if ( ! $diff ) {
48
+ return $check;
49
+ }
50
+
51
+ $key = key( $diff );
52
+ $suffix = substr( $key, strrpos( $key, '-' ) + 1 );
53
+
54
+ $image_meta = self::get_image_meta( $object_id );
55
+
56
+ foreach ( $image_meta['sizes'] as $size_name => $size ) {
57
+ if ( 0 !== strpos( $size_name, 'kip-' ) ) {
58
+ continue;
59
+ }
60
+
61
+ $meta_value[ $size_name . '-' . $suffix ] = $size;
62
+ unset( $image_meta['sizes'][ $size_name ] );
63
+ }
64
+
65
+ if ( ! $this->is_updating_backup_sizes ) {
66
+ $this->is_updating_backup_sizes = true;
67
+ update_post_meta( $object_id, '_wp_attachment_backup_sizes', $meta_value );
68
+ wp_update_attachment_metadata( $object_id, $image_meta );
69
+ return true;
70
+ }
71
+
72
+ $this->is_updating_backup_sizes = false;
73
+
74
+ return $check;
75
+ }
76
+ public function process( $id = null, $width, $height) {
77
+ $sizes = array(array($width, $height));
78
+ $retina = array();
79
+ if ( apply_filters( 'kadence_retina_support', true ) ) {
80
+ $retina_w = $width*2;
81
+ $retina_h = $height*2;
82
+ $retina = array(array($retina_w, $retina_h));
83
+ }
84
+ $sizes = array_reverse(array_merge($sizes,$retina));
85
+ // If we haven't created the image yet, lets do that now.
86
+ $created = false;
87
+ foreach ( $sizes as $size ) {
88
+ if ( self::kt_does_size_already_exist_for_image( $id, $size[0], $size[1] ) ) {
89
+ continue;
90
+ }
91
+
92
+ if ( self::kt_is_size_larger_than_original( $id, $size[0], $size[1] ) ) {
93
+ continue;
94
+ }
95
+ $item = array(
96
+ 'id' => $id,
97
+ 'width' => $size[0],
98
+ 'height' => $size[1],
99
+ 'crop' => true,
100
+ );
101
+ $created = $this->create_image_size( $item );
102
+ }
103
+ return $created;
104
+ }
105
+ public function create_image_size( $item ) {
106
+ try {
107
+ $defaults = array(
108
+ 'id' => 0,
109
+ 'width' => 0,
110
+ 'height' => 0,
111
+ 'crop' => false,
112
+ );
113
+ $item = wp_parse_args( $item, $defaults );
114
+
115
+ $id = $item['id'];
116
+ $width = $item['width'];
117
+ $height = $item['height'];
118
+ $crop = $item['crop'];
119
+
120
+ if ( ! $width && ! $height ) {
121
+ throw new Kadence_Image_Processing_Exception( "Invalid image dimensions" );
122
+ }
123
+ $suffix = "{$width}x{$height}";
124
+ $image_meta = self::kt_get_image_meta($id );
125
+ if ( ! $image_meta ) {
126
+ return false;
127
+ }
128
+ $img_path = get_attached_file( $id );
129
+
130
+ if ( ! $img_path ) {
131
+ return false;
132
+ }
133
+
134
+ $ext = substr($image_meta['file'], strrpos($image_meta['file'], "."));
135
+
136
+ $dst_rel_path = str_replace( '.' . $ext, '', $img_path );
137
+ $destfilename = "{$dst_rel_path}-{$suffix}.{$ext}";
138
+
139
+
140
+ if(file_exists( $destfilename )) {
141
+ $filename = basename($image_meta['file'], $ext) . '-'.$width.'x'.$height.'' . $ext;
142
+ $image_meta['sizes'][ $size_name ] = array(
143
+ 'file' => $filename,
144
+ 'width' => $width,
145
+ 'height' => $height,
146
+ 'mime-type' => isset($image_meta['sizes']['thumbnail']) ? $image_meta['sizes']['thumbnail']['mime-type'] : '',
147
+ );
148
+ wp_update_attachment_metadata( $id, $image_meta );
149
+
150
+ return true;
151
+ }
152
+
153
+ $editor = wp_get_image_editor( $img_path );
154
+
155
+ if ( is_wp_error( $editor ) ) {
156
+ throw new Kadence_Image_Processing_Exception( 'Unable to get WP_Image_Editor for file (is GD or ImageMagick installed?)' );
157
+ }
158
+
159
+ if ( is_wp_error( $editor->resize( $width, $height, $crop ) ) ) {
160
+ throw new Kadence_Image_Processing_Exception( 'Error resizing image');
161
+ }
162
+
163
+ $resized_file = $editor->save();
164
+ if ( is_wp_error( $resized_file ) ) {
165
+ throw new Kadence_Image_Processing_Exception( 'Unable to save resized image file' );
166
+ }
167
+
168
+ $size_name = self::get_size_name( array( $width, $height) );
169
+ $image_meta['sizes'][ $size_name ] = array(
170
+ 'file' => $resized_file['file'],
171
+ 'width' => $resized_file['width'],
172
+ 'height' => $resized_file['height'],
173
+ 'mime-type' => $resized_file['mime-type'],
174
+ );
175
+ wp_update_attachment_metadata( $id, $image_meta );
176
+
177
+ return true;
178
+ }
179
+ catch (Kadence_Image_Processing_Exception $ex) {
180
+ // Only for debugging
181
+ if ($this->throwOnError) {
182
+ // Bubble up exception.
183
+ throw $ex;
184
+ } else {
185
+ // Return false, so that this patch is backwards-compatible.
186
+ return false;
187
+ }
188
+ }
189
+ }
190
+ public static function kt_get_image_meta( $id ) {
191
+ return wp_get_attachment_metadata( $id );
192
+ }
193
+ public static function kt_is_size_larger_than_original($id, $width, $height) {
194
+ $image_meta = self::kt_get_image_meta( $id );
195
+ // no size? then lets try
196
+ if ( ! isset( $image_meta['width'] ) || ! isset( $image_meta['height'] ) ) {
197
+ return true;
198
+ }
199
+ if ( $width > $image_meta['width'] || $height > $image_meta['height'] ) {
200
+ return true;
201
+ }
202
+
203
+ return false;
204
+ }
205
+ public static function kt_does_size_already_exist_for_image( $id, $width, $height ) {
206
+ $image_meta = self::kt_get_image_meta( $id );
207
+ $size_name = self::get_size_name( array($width, $height));
208
+ return isset( $image_meta['sizes'][ $size_name ] );
209
+ }
210
+ public static function get_size_name( $size ) {
211
+ return 'kip-' . $size[0] . 'x' . $size[1];
212
+ }
213
+ }
214
+ Kadence_Image_Processing::getInstance();
215
+ }
languages/virtue-toolkit.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Virtue Toolkit\n"
5
- "POT-Creation-Date: 2015-11-19 15:49-0700\n"
6
  "PO-Revision-Date: 2015-01-10 00:32-0700\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Kadence Themes\n"
@@ -10,12 +10,64 @@ msgstr ""
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 1.8.5\n"
14
  "X-Poedit-KeywordsList: __;_e;_n:1,2;esc_attr__;esc_attr_e\n"
15
  "X-Poedit-Basepath: .\n"
16
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  #: ../cmb/helpers/cmb_Meta_Box_ajax.php:47
20
  msgid "Please Try Again"
21
  msgstr ""
@@ -79,7 +131,7 @@ msgstr ""
79
  #: ../cmb/init.php:259 ../metaboxes.php:62 ../metaboxes.php:73
80
  #: ../metaboxes.php:106 ../metaboxes.php:117 ../metaboxes.php:381
81
  #: ../metaboxes.php:392 ../metaboxes.php:427 ../metaboxes.php:438
82
- #: ../metaboxes.php:503
83
  msgid "Default"
84
  msgstr ""
85
 
@@ -103,11 +155,11 @@ msgstr ""
103
  msgid "Save"
104
  msgstr ""
105
 
106
- #: ../metaboxes.php:17
107
  msgid "Add/Edit Gallery"
108
  msgstr ""
109
 
110
- #: ../metaboxes.php:18
111
  msgid "Clear Gallery"
112
  msgstr ""
113
 
@@ -159,15 +211,17 @@ msgstr ""
159
  msgid "Subtitle will go below post title"
160
  msgstr ""
161
 
162
- #: ../metaboxes.php:126
163
  msgid "Gallery Post Options"
164
  msgstr ""
165
 
166
- #: ../metaboxes.php:135 ../metaboxes.php:190
 
167
  msgid "Post Head Content"
168
  msgstr ""
169
 
170
- #: ../metaboxes.php:140 ../metaboxes.php:170
 
171
  msgid "Gallery Post Default"
172
  msgstr ""
173
 
@@ -180,15 +234,16 @@ msgid "Carousel Slider - (Caroufedsel Slider)"
180
  msgstr ""
181
 
182
  #: ../metaboxes.php:143 ../metaboxes.php:197 ../metaboxes.php:258
183
- #: ../metaboxes.php:753
 
184
  msgid "None"
185
  msgstr ""
186
 
187
- #: ../metaboxes.php:147
188
  msgid "Post Slider Gallery"
189
  msgstr ""
190
 
191
- #: ../metaboxes.php:148 ../metaboxes.php:992 ../metaboxes.php:1138
192
  msgid "Add images for gallery here"
193
  msgstr ""
194
 
@@ -196,7 +251,7 @@ msgstr ""
196
  msgid "Max Slider Height"
197
  msgstr ""
198
 
199
- #: ../metaboxes.php:154 ../metaboxes.php:567
200
  msgid "Default is: 400 (Note: just input number, example: 350)"
201
  msgstr ""
202
 
@@ -210,36 +265,41 @@ msgid ""
210
  "example: 650, only applys to Image Slider)"
211
  msgstr ""
212
 
213
- #: ../metaboxes.php:165 ../metaboxes.php:213
 
214
  msgid "Post Summary"
215
  msgstr ""
216
 
217
- #: ../metaboxes.php:171 ../metaboxes.php:220
 
218
  msgid "Portrait Image (feature image)"
219
  msgstr ""
220
 
221
- #: ../metaboxes.php:172 ../metaboxes.php:221
 
222
  msgid "Landscape Image (feature image)"
223
  msgstr ""
224
 
225
- #: ../metaboxes.php:173
226
  msgid "Portrait Image Slider"
227
  msgstr ""
228
 
229
- #: ../metaboxes.php:174
230
  msgid "Landscape Image Slider"
231
  msgstr ""
232
 
233
- #: ../metaboxes.php:181
234
  msgid "Video Post Options"
235
  msgstr ""
236
 
237
- #: ../metaboxes.php:195 ../metaboxes.php:218
 
238
  msgid "Video Post Default"
239
  msgstr ""
240
 
241
  #: ../metaboxes.php:196 ../metaboxes.php:256 ../metaboxes.php:550
242
- #: ../metaboxes.php:752 ../metaboxes.php:986
 
243
  msgid "Video"
244
  msgstr ""
245
 
@@ -253,7 +313,7 @@ msgid ""
253
  "for screen shot)"
254
  msgstr ""
255
 
256
- #: ../metaboxes.php:207
257
  msgid "Max Video Width"
258
  msgstr ""
259
 
@@ -263,39 +323,40 @@ msgid ""
263
  "example: 650, does not apply to carousel slider)"
264
  msgstr ""
265
 
266
- #: ../metaboxes.php:219
267
  msgid "Video - (when possible)"
268
  msgstr ""
269
 
270
- #: ../metaboxes.php:228 ../metaboxes.php:724
271
  msgid "Portfolio Post Options"
272
  msgstr ""
273
 
274
- #: ../metaboxes.php:236 ../metaboxes.php:732
275
  msgid "Project Layout"
276
  msgstr ""
277
 
278
- #: ../metaboxes.php:241
279
  msgid "Beside 40%"
280
  msgstr ""
281
 
282
- #: ../metaboxes.php:242
283
  msgid "Beside 33%"
284
  msgstr ""
285
 
286
- #: ../metaboxes.php:243 ../metaboxes.php:738
287
  msgid "Above"
288
  msgstr ""
289
 
290
- #: ../metaboxes.php:244 ../metaboxes.php:739
291
  msgid "Three Rows"
292
  msgstr ""
293
 
294
- #: ../metaboxes.php:248 ../metaboxes.php:743
295
  msgid "Project Options"
296
  msgstr ""
297
 
298
- #: ../metaboxes.php:253 ../metaboxes.php:748 ../metaboxes.php:987
 
299
  msgid "Image"
300
  msgstr ""
301
 
@@ -303,38 +364,38 @@ msgstr ""
303
  msgid "Image Slider (Flex Slider)"
304
  msgstr ""
305
 
306
- #: ../metaboxes.php:255 ../metaboxes.php:549 ../metaboxes.php:750
307
  msgid "Carousel Slider"
308
  msgstr ""
309
 
310
- #: ../metaboxes.php:257 ../metaboxes.php:751
311
  msgid "Image Grid"
312
  msgstr ""
313
 
314
- #: ../metaboxes.php:262 ../metaboxes.php:757
315
  msgid "Columns (Only for Image Grid option)"
316
  msgstr ""
317
 
318
- #: ../metaboxes.php:267 ../metaboxes.php:450 ../metaboxes.php:762
319
- #: ../metaboxes.php:892
320
  msgid "Four Column"
321
  msgstr ""
322
 
323
- #: ../metaboxes.php:268 ../metaboxes.php:451 ../metaboxes.php:763
324
- #: ../metaboxes.php:893
325
  msgid "Three Column"
326
  msgstr ""
327
 
328
- #: ../metaboxes.php:269 ../metaboxes.php:452 ../metaboxes.php:764
329
- #: ../metaboxes.php:894
330
  msgid "Two Column"
331
  msgstr ""
332
 
333
- #: ../metaboxes.php:270 ../metaboxes.php:453 ../metaboxes.php:765
334
  msgid "Five Column"
335
  msgstr ""
336
 
337
- #: ../metaboxes.php:271 ../metaboxes.php:766
338
  msgid "Six Column"
339
  msgstr ""
340
 
@@ -346,8 +407,8 @@ msgstr ""
346
  msgid "Add images for post here"
347
  msgstr ""
348
 
349
- #: ../metaboxes.php:281 ../metaboxes.php:566 ../metaboxes.php:770
350
- #: ../metaboxes.php:997
351
  msgid "Max Image/Slider Height"
352
  msgstr ""
353
 
@@ -355,8 +416,8 @@ msgstr ""
355
  msgid "Default is: 450 (Note: just input number, example: 350)"
356
  msgstr ""
357
 
358
- #: ../metaboxes.php:287 ../metaboxes.php:572 ../metaboxes.php:776
359
- #: ../metaboxes.php:1003
360
  msgid "Max Image/Slider Width"
361
  msgstr ""
362
 
@@ -366,92 +427,92 @@ msgid ""
366
  "number, example: 650)"
367
  msgstr ""
368
 
369
- #: ../metaboxes.php:293 ../metaboxes.php:792
370
  msgid "Value 01 Title"
371
  msgstr ""
372
 
373
- #: ../metaboxes.php:294 ../metaboxes.php:793
374
  msgid "ex. Project Type:"
375
  msgstr ""
376
 
377
- #: ../metaboxes.php:299 ../metaboxes.php:798
378
  msgid "Value 01 Description"
379
  msgstr ""
380
 
381
- #: ../metaboxes.php:300 ../metaboxes.php:799
382
  msgid "ex. Character Illustration"
383
  msgstr ""
384
 
385
- #: ../metaboxes.php:305 ../metaboxes.php:804
386
  msgid "Value 02 Title"
387
  msgstr ""
388
 
389
- #: ../metaboxes.php:306 ../metaboxes.php:805
390
  msgid "ex. Skills Needed:"
391
  msgstr ""
392
 
393
- #: ../metaboxes.php:311 ../metaboxes.php:810
394
  msgid "Value 02 Description"
395
  msgstr ""
396
 
397
- #: ../metaboxes.php:312 ../metaboxes.php:811
398
  msgid "ex. Photoshop, Illustrator"
399
  msgstr ""
400
 
401
- #: ../metaboxes.php:317 ../metaboxes.php:816
402
  msgid "Value 03 Title"
403
  msgstr ""
404
 
405
- #: ../metaboxes.php:318 ../metaboxes.php:817
406
  msgid "ex. Customer:"
407
  msgstr ""
408
 
409
- #: ../metaboxes.php:323 ../metaboxes.php:822
410
  msgid "Value 03 Description"
411
  msgstr ""
412
 
413
- #: ../metaboxes.php:324 ../metaboxes.php:823
414
  msgid "ex. Example Inc"
415
  msgstr ""
416
 
417
- #: ../metaboxes.php:329 ../metaboxes.php:828
418
  msgid "Value 04 Title"
419
  msgstr ""
420
 
421
- #: ../metaboxes.php:330 ../metaboxes.php:829
422
  msgid "ex. Project Year:"
423
  msgstr ""
424
 
425
- #: ../metaboxes.php:335 ../metaboxes.php:834
426
  msgid "Value 04 Description"
427
  msgstr ""
428
 
429
- #: ../metaboxes.php:336 ../metaboxes.php:835
430
  msgid "ex. 2013"
431
  msgstr ""
432
 
433
- #: ../metaboxes.php:341 ../metaboxes.php:840
434
  msgid "External Website"
435
  msgstr ""
436
 
437
- #: ../metaboxes.php:342 ../metaboxes.php:841
438
  msgid "ex. Website:"
439
  msgstr ""
440
 
441
- #: ../metaboxes.php:347 ../metaboxes.php:846
442
  msgid "Website Address"
443
  msgstr ""
444
 
445
- #: ../metaboxes.php:348 ../metaboxes.php:847
446
  msgid "ex. http://www.example.com"
447
  msgstr ""
448
 
449
- #: ../metaboxes.php:353 ../metaboxes.php:852
450
  msgid "If Video Project"
451
  msgstr ""
452
 
453
- #: ../metaboxes.php:354 ../metaboxes.php:579 ../metaboxes.php:716
454
- #: ../metaboxes.php:853 ../metaboxes.php:1020
455
  msgid "Place Embed Code Here, works with youtube, vimeo..."
456
  msgstr ""
457
 
@@ -459,33 +520,33 @@ msgstr ""
459
  msgid "Bottom Carousel Options"
460
  msgstr ""
461
 
462
- #: ../metaboxes.php:370 ../metaboxes.php:868
463
  msgid "Carousel Title"
464
  msgstr ""
465
 
466
- #: ../metaboxes.php:371 ../metaboxes.php:869
467
  msgid "ex. Similar Projects"
468
  msgstr ""
469
 
470
- #: ../metaboxes.php:376
471
  msgid "Bottom Portfolio Carousel"
472
  msgstr ""
473
 
474
- #: ../metaboxes.php:377
475
  msgid "Display a carousel with portfolio items below project?"
476
  msgstr ""
477
 
478
- #: ../metaboxes.php:382 ../metaboxes.php:602 ../metaboxes.php:624
479
- #: ../metaboxes.php:633 ../metaboxes.php:788 ../metaboxes.php:863
480
- #: ../metaboxes.php:963 ../metaboxes.php:1015 ../metaboxes.php:1043
481
- #: ../metaboxes.php:1059 ../metaboxes.php:1068
482
  msgid "No"
483
  msgstr ""
484
 
485
- #: ../metaboxes.php:383 ../metaboxes.php:601 ../metaboxes.php:623
486
- #: ../metaboxes.php:634 ../metaboxes.php:787 ../metaboxes.php:964
487
- #: ../metaboxes.php:1014 ../metaboxes.php:1042 ../metaboxes.php:1058
488
- #: ../metaboxes.php:1069
489
  msgid "Yes"
490
  msgstr ""
491
 
@@ -505,23 +566,23 @@ msgstr ""
505
  msgid "Carousel Order"
506
  msgstr ""
507
 
508
- #: ../metaboxes.php:403 ../metaboxes.php:468 ../metaboxes.php:910
509
  msgid "Menu Order"
510
  msgstr ""
511
 
512
- #: ../metaboxes.php:404 ../metaboxes.php:469 ../metaboxes.php:911
513
  msgid "Title"
514
  msgstr ""
515
 
516
- #: ../metaboxes.php:405 ../metaboxes.php:470 ../metaboxes.php:912
517
  msgid "Date"
518
  msgstr ""
519
 
520
- #: ../metaboxes.php:406 ../metaboxes.php:471 ../metaboxes.php:913
521
  msgid "Random"
522
  msgstr ""
523
 
524
- #: ../metaboxes.php:414 ../metaboxes.php:878
525
  msgid "Portfolio Page Options"
526
  msgstr ""
527
 
@@ -553,27 +614,27 @@ msgstr ""
553
  msgid "Primary Color"
554
  msgstr ""
555
 
556
- #: ../metaboxes.php:445 ../metaboxes.php:887
557
  msgid "Columns"
558
  msgstr ""
559
 
560
- #: ../metaboxes.php:457 ../metaboxes.php:898
561
  msgid "Portfolio Work Types"
562
  msgstr ""
563
 
564
- #: ../metaboxes.php:463 ../metaboxes.php:905
565
  msgid "Order Items By"
566
  msgstr ""
567
 
568
- #: ../metaboxes.php:475 ../metaboxes.php:917
569
  msgid "Items per Page"
570
  msgstr ""
571
 
572
- #: ../metaboxes.php:476 ../metaboxes.php:918
573
  msgid "How many portfolio items per page"
574
  msgstr ""
575
 
576
- #: ../metaboxes.php:480 ../metaboxes.php:922
577
  msgid "All"
578
  msgstr ""
579
 
@@ -597,11 +658,11 @@ msgstr ""
597
  msgid "Wide Landscape 4:2"
598
  msgstr ""
599
 
600
- #: ../metaboxes.php:511 ../metaboxes.php:946
601
  msgid "Display Item Work Types"
602
  msgstr ""
603
 
604
- #: ../metaboxes.php:517 ../metaboxes.php:952
605
  msgid "Display Item Excerpt"
606
  msgstr ""
607
 
@@ -609,7 +670,7 @@ msgstr ""
609
  msgid "Add Lightbox link in each item"
610
  msgstr ""
611
 
612
- #: ../metaboxes.php:532 ../metaboxes.php:971
613
  msgid "Feature Page Options"
614
  msgstr ""
615
 
@@ -625,7 +686,7 @@ msgstr ""
625
  msgid "Page Title"
626
  msgstr ""
627
 
628
- #: ../metaboxes.php:554 ../metaboxes.php:1130
629
  msgid "Slider Images"
630
  msgstr ""
631
 
@@ -633,260 +694,399 @@ msgstr ""
633
  msgid "Add for flex, carousel, and image carousel."
634
  msgstr ""
635
 
636
- #: ../metaboxes.php:560
637
- msgid "If Cyclone Slider"
638
- msgstr ""
639
-
640
- #: ../metaboxes.php:561
641
- msgid ""
642
- "Paste Cyclone slider shortcode here (example: [cycloneslider id=\"slider1\"])"
643
- msgstr ""
644
-
645
- #: ../metaboxes.php:573
646
  msgid ""
647
  "Default is: 1140 on fullwidth posts (Note: just input number, example: 650, "
648
  "does not apply to Carousel slider)"
649
  msgstr ""
650
 
651
- #: ../metaboxes.php:578 ../metaboxes.php:715 ../metaboxes.php:1019
652
  msgid "If Video Post"
653
  msgstr ""
654
 
655
- #: ../metaboxes.php:587 ../metaboxes.php:1028
656
  msgid "Contact Page Options"
657
  msgstr ""
658
 
659
- #: ../metaboxes.php:596 ../metaboxes.php:1037
660
  msgid "Use Contact Form"
661
  msgstr ""
662
 
663
- #: ../metaboxes.php:606 ../metaboxes.php:1047
664
  msgid "Contact Form Title"
665
  msgstr ""
666
 
667
- #: ../metaboxes.php:607 ../metaboxes.php:1048
668
  msgid "ex. Send us an Email"
669
  msgstr ""
670
 
671
- #: ../metaboxes.php:612
672
  msgid "Contact Form Email Recipient"
673
  msgstr ""
674
 
675
- #: ../metaboxes.php:613
676
  msgid "ex. joe@gmail.com"
677
  msgstr ""
678
 
679
- #: ../metaboxes.php:618 ../metaboxes.php:1053
680
  msgid "Use Simple Math Question"
681
  msgstr ""
682
 
683
- #: ../metaboxes.php:628 ../metaboxes.php:1063
684
  msgid "Use Map"
685
  msgstr ""
686
 
687
- #: ../metaboxes.php:638 ../metaboxes.php:1073
 
 
 
 
 
 
688
  msgid "Address"
689
  msgstr ""
690
 
691
- #: ../metaboxes.php:639 ../metaboxes.php:1074
692
  msgid "Enter your Location"
693
  msgstr ""
694
 
695
- #: ../metaboxes.php:644 ../metaboxes.php:1079
696
  msgid "Map Type"
697
  msgstr ""
698
 
699
- #: ../metaboxes.php:649 ../metaboxes.php:1084
700
  msgid "ROADMAP"
701
  msgstr ""
702
 
703
- #: ../metaboxes.php:650 ../metaboxes.php:1085
704
  msgid "HYBRID"
705
  msgstr ""
706
 
707
- #: ../metaboxes.php:651 ../metaboxes.php:1086
708
  msgid "TERRAIN"
709
  msgstr ""
710
 
711
- #: ../metaboxes.php:652 ../metaboxes.php:1087
712
  msgid "SATELLITE"
713
  msgstr ""
714
 
715
- #: ../metaboxes.php:656 ../metaboxes.php:1091
716
  msgid "Map Zoom Level"
717
  msgstr ""
718
 
719
- #: ../metaboxes.php:657 ../metaboxes.php:1092
720
  msgid "A good place to start is 15"
721
  msgstr ""
722
 
723
- #: ../metaboxes.php:662 ../metaboxes.php:1097
724
  msgid "1 (World View)"
725
  msgstr ""
726
 
727
- #: ../metaboxes.php:682 ../metaboxes.php:1117
728
  msgid "21 (Street View)"
729
  msgstr ""
730
 
731
- #: ../metaboxes.php:686 ../metaboxes.php:1121
732
  msgid "Map Height"
733
  msgstr ""
734
 
735
- #: ../metaboxes.php:687 ../metaboxes.php:1122
736
  msgid "Default is 300"
737
  msgstr ""
738
 
739
- #: ../metaboxes.php:707
740
  msgid "Post Video Box"
741
  msgstr ""
742
 
743
- #: ../metaboxes.php:737
744
  msgid "Beside"
745
  msgstr ""
746
 
747
- #: ../metaboxes.php:749 ../metaboxes.php:985
748
  msgid "Image Slider"
749
  msgstr ""
750
 
751
- #: ../metaboxes.php:771
752
  msgid "Default is: 450 <b>(Note: just input number, example: 350)</b>"
753
  msgstr ""
754
 
755
- #: ../metaboxes.php:777
756
  msgid ""
757
  "Default is: 670 or 1140 on <b>above</b> or <b>three row</b> layouts (Note: "
758
  "just input number, example: 650)</b>"
759
  msgstr ""
760
 
761
- #: ../metaboxes.php:782
762
  msgid "Auto Play Slider?"
763
  msgstr ""
764
 
765
- #: ../metaboxes.php:858
766
  msgid "Similar Portfolio Item Carousel"
767
  msgstr ""
768
 
769
- #: ../metaboxes.php:859
770
  msgid "Display a carousel with similar portfolio items below project?"
771
  msgstr ""
772
 
773
- #: ../metaboxes.php:864
774
  msgid "Yes - Display Recent Projects"
775
  msgstr ""
776
 
777
- #: ../metaboxes.php:940
778
  msgid "Set image height"
779
  msgstr ""
780
 
781
- #: ../metaboxes.php:941
782
  msgid "Default is 1:1 ratio <b>(Note: just input number, example: 350)</b>"
783
  msgstr ""
784
 
785
- #: ../metaboxes.php:958
786
  msgid "Add Lightbox link in the top right of each item"
787
  msgstr ""
788
 
789
- #: ../metaboxes.php:980
790
  msgid "Feature Options"
791
  msgstr ""
792
 
793
- #: ../metaboxes.php:981
794
  msgid "If image slider make sure images uploaded are at least 1140px wide."
795
  msgstr ""
796
 
797
- #: ../metaboxes.php:991 ../metaboxes.php:1137
798
  msgid "Slider Gallery"
799
  msgstr ""
800
 
801
- #: ../metaboxes.php:998
802
  msgid "Default is: 400 <b>(Note: just input number, example: 350)</b>"
803
  msgstr ""
804
 
805
- #: ../metaboxes.php:1004
806
  msgid ""
807
  "Default is: 1140 <b>(Note: just input number, example: 650, does not apply "
808
  "to Carousel slider)</b>"
809
  msgstr ""
810
 
811
- #: ../metaboxes.php:1009
812
  msgid "Use Lightbox for Feature Image"
813
  msgstr ""
814
 
815
- #: ../metaboxes.php:1010
816
  msgid ""
817
  "If feature option is set to image, choose to use lightbox link with image."
818
  msgstr ""
819
 
820
- #: ../page-contact.php:13 ../template-contact.php:13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
821
  msgid "This field is required."
822
  msgstr ""
823
 
824
- #: ../page-contact.php:14 ../template-contact.php:14
825
  msgid "Please enter a valid email address."
826
  msgstr ""
827
 
828
- #: ../page-contact.php:97 ../template-contact.php:98
829
  msgid "Check your math."
830
  msgstr ""
831
 
832
- #: ../page-contact.php:102 ../template-contact.php:103
833
  msgid "Please enter your name."
834
  msgstr ""
835
 
836
- #: ../page-contact.php:109 ../template-contact.php:110
837
  msgid "Please enter your email address."
838
  msgstr ""
839
 
840
- #: ../page-contact.php:112 ../template-contact.php:113
841
  msgid "You entered an invalid email address."
842
  msgstr ""
843
 
844
- #: ../page-contact.php:119 ../template-contact.php:120
845
  msgid "Please enter a message."
846
  msgstr ""
847
 
848
- #: ../page-contact.php:136 ../pagetemplater.php:28 ../pagetemplater.php:116
849
- #: ../template-contact.php:137
850
  msgid "Contact"
851
  msgstr ""
852
 
853
- #: ../page-contact.php:136 ../template-contact.php:137
854
  msgid "From"
855
  msgstr ""
856
 
857
- #: ../page-contact.php:137 ../template-contact.php:138
858
  msgid "Name"
859
  msgstr ""
860
 
861
- #: ../page-contact.php:138 ../template-contact.php:139
862
  msgid "Email"
863
  msgstr ""
864
 
865
- #: ../page-contact.php:139 ../template-contact.php:140
866
  msgid "Comments"
867
  msgstr ""
868
 
869
- #: ../page-contact.php:177 ../template-contact.php:175
870
  msgid "Thanks, your email was sent successfully."
871
  msgstr ""
872
 
873
- #: ../page-contact.php:182 ../template-contact.php:179
874
  msgid "Sorry, an error occured."
875
  msgstr ""
876
 
877
- #: ../page-contact.php:188 ../template-contact.php:185
878
  msgid "Name:"
879
  msgstr ""
880
 
881
- #: ../page-contact.php:196 ../template-contact.php:195
882
  msgid "Email:"
883
  msgstr ""
884
 
885
- #: ../page-contact.php:204 ../template-contact.php:202
886
  msgid "Message:"
887
  msgstr ""
888
 
889
- #: ../page-contact.php:224 ../template-contact.php:220
890
  msgid "Send Email"
891
  msgstr ""
892
 
@@ -980,8 +1180,8 @@ msgstr ""
980
  msgid "You are not allowed to be here"
981
  msgstr ""
982
 
983
- #: ../shortcodes.php:149 ../shortcodes.php:152 ../shortcodes.php:175
984
- #: ../shortcodes.php:178
985
  msgid "please specify correct url"
986
  msgstr ""
987
 
@@ -1238,3 +1438,11 @@ msgstr ""
1238
  #: ../shortcodes/youtube/youtube_popup.php:66
1239
  msgid "YouTube Link"
1240
  msgstr ""
 
 
 
 
 
 
 
 
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Virtue Toolkit\n"
5
+ "POT-Creation-Date: 2017-03-30 10:04-0600\n"
6
  "PO-Revision-Date: 2015-01-10 00:32-0700\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Kadence Themes\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 1.8.12\n"
14
  "X-Poedit-KeywordsList: __;_e;_n:1,2;esc_attr__;esc_attr_e\n"
15
  "X-Poedit-Basepath: .\n"
16
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
+ #: ../author_box.php:7
20
+ msgid "Extra profile information for author box"
21
+ msgstr ""
22
+
23
+ #: ../author_box.php:13
24
+ msgid "Occupation"
25
+ msgstr ""
26
+
27
+ #: ../author_box.php:18
28
+ msgid "Please enter your Occupation."
29
+ msgstr ""
30
+
31
+ #: ../author_box.php:27
32
+ msgid "Please enter your Twitter username."
33
+ msgstr ""
34
+
35
+ #: ../author_box.php:35
36
+ msgid "Please enter your Facebook url. (be sure to include http://)"
37
+ msgstr ""
38
+
39
+ #: ../author_box.php:44
40
+ msgid "Please enter your Google Plus url. (be sure to include http://)"
41
+ msgstr ""
42
+
43
+ #: ../author_box.php:53
44
+ msgid "Please enter your YouTube url. (be sure to include http://)"
45
+ msgstr ""
46
+
47
+ #: ../author_box.php:62
48
+ msgid "Please enter your Flickr url. (be sure to include http://)"
49
+ msgstr ""
50
+
51
+ #: ../author_box.php:71
52
+ msgid "Please enter your Vimeo url. (be sure to include http://)"
53
+ msgstr ""
54
+
55
+ #: ../author_box.php:80
56
+ msgid "Please enter your Linkedin url. (be sure to include http://)"
57
+ msgstr ""
58
+
59
+ #: ../author_box.php:89
60
+ msgid "Please enter your Dribbble url. (be sure to include http://)"
61
+ msgstr ""
62
+
63
+ #: ../author_box.php:98
64
+ msgid "Please enter your Pinterest url. (be sure to include http://)"
65
+ msgstr ""
66
+
67
+ #: ../author_box.php:107
68
+ msgid "Please enter your Instagram url. (be sure to include http://)"
69
+ msgstr ""
70
+
71
  #: ../cmb/helpers/cmb_Meta_Box_ajax.php:47
72
  msgid "Please Try Again"
73
  msgstr ""
131
  #: ../cmb/init.php:259 ../metaboxes.php:62 ../metaboxes.php:73
132
  #: ../metaboxes.php:106 ../metaboxes.php:117 ../metaboxes.php:381
133
  #: ../metaboxes.php:392 ../metaboxes.php:427 ../metaboxes.php:438
134
+ #: ../metaboxes.php:503 ../metaboxes.php:1321 ../metaboxes.php:1400
135
  msgid "Default"
136
  msgstr ""
137
 
155
  msgid "Save"
156
  msgstr ""
157
 
158
+ #: ../metaboxes.php:17 ../metaboxes.php:1164
159
  msgid "Add/Edit Gallery"
160
  msgstr ""
161
 
162
+ #: ../metaboxes.php:18 ../metaboxes.php:1165
163
  msgid "Clear Gallery"
164
  msgstr ""
165
 
211
  msgid "Subtitle will go below post title"
212
  msgstr ""
213
 
214
+ #: ../metaboxes.php:126 ../metaboxes.php:1180
215
  msgid "Gallery Post Options"
216
  msgstr ""
217
 
218
+ #: ../metaboxes.php:135 ../metaboxes.php:190 ../metaboxes.php:1186
219
+ #: ../metaboxes.php:1248
220
  msgid "Post Head Content"
221
  msgstr ""
222
 
223
+ #: ../metaboxes.php:140 ../metaboxes.php:170 ../metaboxes.php:1191
224
+ #: ../metaboxes.php:1232
225
  msgid "Gallery Post Default"
226
  msgstr ""
227
 
234
  msgstr ""
235
 
236
  #: ../metaboxes.php:143 ../metaboxes.php:197 ../metaboxes.php:258
237
+ #: ../metaboxes.php:747 ../metaboxes.php:1198 ../metaboxes.php:1255
238
+ #: ../metaboxes.php:1340
239
  msgid "None"
240
  msgstr ""
241
 
242
+ #: ../metaboxes.php:147 ../metaboxes.php:1202
243
  msgid "Post Slider Gallery"
244
  msgstr ""
245
 
246
+ #: ../metaboxes.php:148 ../metaboxes.php:986 ../metaboxes.php:1132
247
  msgid "Add images for gallery here"
248
  msgstr ""
249
 
251
  msgid "Max Slider Height"
252
  msgstr ""
253
 
254
+ #: ../metaboxes.php:154 ../metaboxes.php:561
255
  msgid "Default is: 400 (Note: just input number, example: 350)"
256
  msgstr ""
257
 
265
  "example: 650, only applys to Image Slider)"
266
  msgstr ""
267
 
268
+ #: ../metaboxes.php:165 ../metaboxes.php:213 ../metaboxes.php:1227
269
+ #: ../metaboxes.php:1284
270
  msgid "Post Summary"
271
  msgstr ""
272
 
273
+ #: ../metaboxes.php:171 ../metaboxes.php:220 ../metaboxes.php:1233
274
+ #: ../metaboxes.php:1291
275
  msgid "Portrait Image (feature image)"
276
  msgstr ""
277
 
278
+ #: ../metaboxes.php:172 ../metaboxes.php:221 ../metaboxes.php:1234
279
+ #: ../metaboxes.php:1292
280
  msgid "Landscape Image (feature image)"
281
  msgstr ""
282
 
283
+ #: ../metaboxes.php:173 ../metaboxes.php:1235
284
  msgid "Portrait Image Slider"
285
  msgstr ""
286
 
287
+ #: ../metaboxes.php:174 ../metaboxes.php:1236
288
  msgid "Landscape Image Slider"
289
  msgstr ""
290
 
291
+ #: ../metaboxes.php:181 ../metaboxes.php:1243
292
  msgid "Video Post Options"
293
  msgstr ""
294
 
295
+ #: ../metaboxes.php:195 ../metaboxes.php:218 ../metaboxes.php:1253
296
+ #: ../metaboxes.php:1289
297
  msgid "Video Post Default"
298
  msgstr ""
299
 
300
  #: ../metaboxes.php:196 ../metaboxes.php:256 ../metaboxes.php:550
301
+ #: ../metaboxes.php:746 ../metaboxes.php:980 ../metaboxes.php:1254
302
+ #: ../metaboxes.php:1339
303
  msgid "Video"
304
  msgstr ""
305
 
313
  "for screen shot)"
314
  msgstr ""
315
 
316
+ #: ../metaboxes.php:207 ../metaboxes.php:1278
317
  msgid "Max Video Width"
318
  msgstr ""
319
 
323
  "example: 650, does not apply to carousel slider)"
324
  msgstr ""
325
 
326
+ #: ../metaboxes.php:219 ../metaboxes.php:1290
327
  msgid "Video - (when possible)"
328
  msgstr ""
329
 
330
+ #: ../metaboxes.php:228 ../metaboxes.php:718
331
  msgid "Portfolio Post Options"
332
  msgstr ""
333
 
334
+ #: ../metaboxes.php:236 ../metaboxes.php:726 ../metaboxes.php:1316
335
  msgid "Project Layout"
336
  msgstr ""
337
 
338
+ #: ../metaboxes.php:241 ../metaboxes.php:1322
339
  msgid "Beside 40%"
340
  msgstr ""
341
 
342
+ #: ../metaboxes.php:242 ../metaboxes.php:1323
343
  msgid "Beside 33%"
344
  msgstr ""
345
 
346
+ #: ../metaboxes.php:243 ../metaboxes.php:732 ../metaboxes.php:1324
347
  msgid "Above"
348
  msgstr ""
349
 
350
+ #: ../metaboxes.php:244 ../metaboxes.php:733
351
  msgid "Three Rows"
352
  msgstr ""
353
 
354
+ #: ../metaboxes.php:248 ../metaboxes.php:737 ../metaboxes.php:1328
355
  msgid "Project Options"
356
  msgstr ""
357
 
358
+ #: ../metaboxes.php:253 ../metaboxes.php:742 ../metaboxes.php:981
359
+ #: ../metaboxes.php:1333
360
  msgid "Image"
361
  msgstr ""
362
 
364
  msgid "Image Slider (Flex Slider)"
365
  msgstr ""
366
 
367
+ #: ../metaboxes.php:255 ../metaboxes.php:549 ../metaboxes.php:744
368
  msgid "Carousel Slider"
369
  msgstr ""
370
 
371
+ #: ../metaboxes.php:257 ../metaboxes.php:745
372
  msgid "Image Grid"
373
  msgstr ""
374
 
375
+ #: ../metaboxes.php:262 ../metaboxes.php:751
376
  msgid "Columns (Only for Image Grid option)"
377
  msgstr ""
378
 
379
+ #: ../metaboxes.php:267 ../metaboxes.php:450 ../metaboxes.php:756
380
+ #: ../metaboxes.php:886
381
  msgid "Four Column"
382
  msgstr ""
383
 
384
+ #: ../metaboxes.php:268 ../metaboxes.php:451 ../metaboxes.php:757
385
+ #: ../metaboxes.php:887
386
  msgid "Three Column"
387
  msgstr ""
388
 
389
+ #: ../metaboxes.php:269 ../metaboxes.php:452 ../metaboxes.php:758
390
+ #: ../metaboxes.php:888
391
  msgid "Two Column"
392
  msgstr ""
393
 
394
+ #: ../metaboxes.php:270 ../metaboxes.php:453 ../metaboxes.php:759
395
  msgid "Five Column"
396
  msgstr ""
397
 
398
+ #: ../metaboxes.php:271 ../metaboxes.php:760
399
  msgid "Six Column"
400
  msgstr ""
401
 
407
  msgid "Add images for post here"
408
  msgstr ""
409
 
410
+ #: ../metaboxes.php:281 ../metaboxes.php:560 ../metaboxes.php:764
411
+ #: ../metaboxes.php:991
412
  msgid "Max Image/Slider Height"
413
  msgstr ""
414
 
416
  msgid "Default is: 450 (Note: just input number, example: 350)"
417
  msgstr ""
418
 
419
+ #: ../metaboxes.php:287 ../metaboxes.php:566 ../metaboxes.php:770
420
+ #: ../metaboxes.php:997
421
  msgid "Max Image/Slider Width"
422
  msgstr ""
423
 
427
  "number, example: 650)"
428
  msgstr ""
429
 
430
+ #: ../metaboxes.php:293 ../metaboxes.php:786
431
  msgid "Value 01 Title"
432
  msgstr ""
433
 
434
+ #: ../metaboxes.php:294 ../metaboxes.php:787
435
  msgid "ex. Project Type:"
436
  msgstr ""
437
 
438
+ #: ../metaboxes.php:299 ../metaboxes.php:792
439
  msgid "Value 01 Description"
440
  msgstr ""
441
 
442
+ #: ../metaboxes.php:300 ../metaboxes.php:793
443
  msgid "ex. Character Illustration"
444
  msgstr ""
445
 
446
+ #: ../metaboxes.php:305 ../metaboxes.php:798
447
  msgid "Value 02 Title"
448
  msgstr ""
449
 
450
+ #: ../metaboxes.php:306 ../metaboxes.php:799
451
  msgid "ex. Skills Needed:"
452
  msgstr ""
453
 
454
+ #: ../metaboxes.php:311 ../metaboxes.php:804
455
  msgid "Value 02 Description"
456
  msgstr ""
457
 
458
+ #: ../metaboxes.php:312 ../metaboxes.php:805
459
  msgid "ex. Photoshop, Illustrator"
460
  msgstr ""
461
 
462
+ #: ../metaboxes.php:317 ../metaboxes.php:810
463
  msgid "Value 03 Title"
464
  msgstr ""
465
 
466
+ #: ../metaboxes.php:318 ../metaboxes.php:811
467
  msgid "ex. Customer:"
468
  msgstr ""
469
 
470
+ #: ../metaboxes.php:323 ../metaboxes.php:816
471
  msgid "Value 03 Description"
472
  msgstr ""
473
 
474
+ #: ../metaboxes.php:324 ../metaboxes.php:817
475
  msgid "ex. Example Inc"
476
  msgstr ""
477
 
478
+ #: ../metaboxes.php:329 ../metaboxes.php:822
479
  msgid "Value 04 Title"
480
  msgstr ""
481
 
482
+ #: ../metaboxes.php:330 ../metaboxes.php:823
483
  msgid "ex. Project Year:"
484
  msgstr ""
485
 
486
+ #: ../metaboxes.php:335 ../metaboxes.php:828
487
  msgid "Value 04 Description"
488
  msgstr ""
489
 
490
+ #: ../metaboxes.php:336 ../metaboxes.php:829
491
  msgid "ex. 2013"
492
  msgstr ""
493
 
494
+ #: ../metaboxes.php:341 ../metaboxes.php:834
495
  msgid "External Website"
496
  msgstr ""
497
 
498
+ #: ../metaboxes.php:342 ../metaboxes.php:835
499
  msgid "ex. Website:"
500
  msgstr ""
501
 
502
+ #: ../metaboxes.php:347 ../metaboxes.php:840
503
  msgid "Website Address"
504
  msgstr ""
505
 
506
+ #: ../metaboxes.php:348 ../metaboxes.php:841
507
  msgid "ex. http://www.example.com"
508
  msgstr ""
509
 
510
+ #: ../metaboxes.php:353 ../metaboxes.php:846
511
  msgid "If Video Project"
512
  msgstr ""
513
 
514
+ #: ../metaboxes.php:354 ../metaboxes.php:573 ../metaboxes.php:710
515
+ #: ../metaboxes.php:847 ../metaboxes.php:1014
516
  msgid "Place Embed Code Here, works with youtube, vimeo..."
517
  msgstr ""
518
 
520
  msgid "Bottom Carousel Options"
521
  msgstr ""
522
 
523
+ #: ../metaboxes.php:370 ../metaboxes.php:862 ../metaboxes.php:1389
524
  msgid "Carousel Title"
525
  msgstr ""
526
 
527
+ #: ../metaboxes.php:371 ../metaboxes.php:863 ../metaboxes.php:1390
528
  msgid "ex. Similar Projects"
529
  msgstr ""
530
 
531
+ #: ../metaboxes.php:376 ../metaboxes.php:1395
532
  msgid "Bottom Portfolio Carousel"
533
  msgstr ""
534
 
535
+ #: ../metaboxes.php:377 ../metaboxes.php:1396
536
  msgid "Display a carousel with portfolio items below project?"
537
  msgstr ""
538
 
539
+ #: ../metaboxes.php:382 ../metaboxes.php:596 ../metaboxes.php:618
540
+ #: ../metaboxes.php:627 ../metaboxes.php:782 ../metaboxes.php:857
541
+ #: ../metaboxes.php:957 ../metaboxes.php:1009 ../metaboxes.php:1037
542
+ #: ../metaboxes.php:1053 ../metaboxes.php:1062
543
  msgid "No"
544
  msgstr ""
545
 
546
+ #: ../metaboxes.php:383 ../metaboxes.php:595 ../metaboxes.php:617
547
+ #: ../metaboxes.php:628 ../metaboxes.php:781 ../metaboxes.php:958
548
+ #: ../metaboxes.php:1008 ../metaboxes.php:1036 ../metaboxes.php:1052
549
+ #: ../metaboxes.php:1063
550
  msgid "Yes"
551
  msgstr ""
552
 
566
  msgid "Carousel Order"
567
  msgstr ""
568
 
569
+ #: ../metaboxes.php:403 ../metaboxes.php:468 ../metaboxes.php:904
570
  msgid "Menu Order"
571
  msgstr ""
572
 
573
+ #: ../metaboxes.php:404 ../metaboxes.php:469 ../metaboxes.php:905
574
  msgid "Title"
575
  msgstr ""
576
 
577
+ #: ../metaboxes.php:405 ../metaboxes.php:470 ../metaboxes.php:906
578
  msgid "Date"
579
  msgstr ""
580
 
581
+ #: ../metaboxes.php:406 ../metaboxes.php:471 ../metaboxes.php:907
582
  msgid "Random"
583
  msgstr ""
584
 
585
+ #: ../metaboxes.php:414 ../metaboxes.php:872
586
  msgid "Portfolio Page Options"
587
  msgstr ""
588
 
614
  msgid "Primary Color"
615
  msgstr ""
616
 
617
+ #: ../metaboxes.php:445 ../metaboxes.php:881 ../metaboxes.php:1344
618
  msgid "Columns"
619
  msgstr ""
620
 
621
+ #: ../metaboxes.php:457 ../metaboxes.php:892
622
  msgid "Portfolio Work Types"
623
  msgstr ""
624
 
625
+ #: ../metaboxes.php:463 ../metaboxes.php:899
626
  msgid "Order Items By"
627
  msgstr ""
628
 
629
+ #: ../metaboxes.php:475 ../metaboxes.php:911
630
  msgid "Items per Page"
631
  msgstr ""
632
 
633
+ #: ../metaboxes.php:476 ../metaboxes.php:912
634
  msgid "How many portfolio items per page"
635
  msgstr ""
636
 
637
+ #: ../metaboxes.php:480 ../metaboxes.php:916
638
  msgid "All"
639
  msgstr ""
640
 
658
  msgid "Wide Landscape 4:2"
659
  msgstr ""
660
 
661
+ #: ../metaboxes.php:511 ../metaboxes.php:940
662
  msgid "Display Item Work Types"
663
  msgstr ""
664
 
665
+ #: ../metaboxes.php:517 ../metaboxes.php:946
666
  msgid "Display Item Excerpt"
667
  msgstr ""
668
 
670
  msgid "Add Lightbox link in each item"
671
  msgstr ""
672
 
673
+ #: ../metaboxes.php:532 ../metaboxes.php:965
674
  msgid "Feature Page Options"
675
  msgstr ""
676
 
686
  msgid "Page Title"
687
  msgstr ""
688
 
689
+ #: ../metaboxes.php:554 ../metaboxes.php:1124
690
  msgid "Slider Images"
691
  msgstr ""
692
 
694
  msgid "Add for flex, carousel, and image carousel."
695
  msgstr ""
696
 
697
+ #: ../metaboxes.php:567
 
 
 
 
 
 
 
 
 
698
  msgid ""
699
  "Default is: 1140 on fullwidth posts (Note: just input number, example: 650, "
700
  "does not apply to Carousel slider)"
701
  msgstr ""
702
 
703
+ #: ../metaboxes.php:572 ../metaboxes.php:709 ../metaboxes.php:1013
704
  msgid "If Video Post"
705
  msgstr ""
706
 
707
+ #: ../metaboxes.php:581 ../metaboxes.php:1022
708
  msgid "Contact Page Options"
709
  msgstr ""
710
 
711
+ #: ../metaboxes.php:590 ../metaboxes.php:1031
712
  msgid "Use Contact Form"
713
  msgstr ""
714
 
715
+ #: ../metaboxes.php:600 ../metaboxes.php:1041
716
  msgid "Contact Form Title"
717
  msgstr ""
718
 
719
+ #: ../metaboxes.php:601 ../metaboxes.php:1042
720
  msgid "ex. Send us an Email"
721
  msgstr ""
722
 
723
+ #: ../metaboxes.php:606
724
  msgid "Contact Form Email Recipient"
725
  msgstr ""
726
 
727
+ #: ../metaboxes.php:607
728
  msgid "ex. joe@gmail.com"
729
  msgstr ""
730
 
731
+ #: ../metaboxes.php:612 ../metaboxes.php:1047
732
  msgid "Use Simple Math Question"
733
  msgstr ""
734
 
735
+ #: ../metaboxes.php:622 ../metaboxes.php:1057
736
  msgid "Use Map"
737
  msgstr ""
738
 
739
+ #: ../metaboxes.php:623 ../metaboxes.php:1058
740
+ msgid ""
741
+ "You need free api for google maps to work, add in the theme options > misc "
742
+ "settings."
743
+ msgstr ""
744
+
745
+ #: ../metaboxes.php:632 ../metaboxes.php:1067
746
  msgid "Address"
747
  msgstr ""
748
 
749
+ #: ../metaboxes.php:633 ../metaboxes.php:1068
750
  msgid "Enter your Location"
751
  msgstr ""
752
 
753
+ #: ../metaboxes.php:638 ../metaboxes.php:1073
754
  msgid "Map Type"
755
  msgstr ""
756
 
757
+ #: ../metaboxes.php:643 ../metaboxes.php:1078
758
  msgid "ROADMAP"
759
  msgstr ""
760
 
761
+ #: ../metaboxes.php:644 ../metaboxes.php:1079
762
  msgid "HYBRID"
763
  msgstr ""
764
 
765
+ #: ../metaboxes.php:645 ../metaboxes.php:1080
766
  msgid "TERRAIN"
767
  msgstr ""
768
 
769
+ #: ../metaboxes.php:646 ../metaboxes.php:1081
770
  msgid "SATELLITE"
771
  msgstr ""
772
 
773
+ #: ../metaboxes.php:650 ../metaboxes.php:1085
774
  msgid "Map Zoom Level"
775
  msgstr ""
776
 
777
+ #: ../metaboxes.php:651 ../metaboxes.php:1086
778
  msgid "A good place to start is 15"
779
  msgstr ""
780
 
781
+ #: ../metaboxes.php:656 ../metaboxes.php:1091
782
  msgid "1 (World View)"
783
  msgstr ""
784
 
785
+ #: ../metaboxes.php:676 ../metaboxes.php:1111
786
  msgid "21 (Street View)"
787
  msgstr ""
788
 
789
+ #: ../metaboxes.php:680 ../metaboxes.php:1115
790
  msgid "Map Height"
791
  msgstr ""
792
 
793
+ #: ../metaboxes.php:681 ../metaboxes.php:1116
794
  msgid "Default is 300"
795
  msgstr ""
796
 
797
+ #: ../metaboxes.php:701
798
  msgid "Post Video Box"
799
  msgstr ""
800
 
801
+ #: ../metaboxes.php:731
802
  msgid "Beside"
803
  msgstr ""
804
 
805
+ #: ../metaboxes.php:743 ../metaboxes.php:979
806
  msgid "Image Slider"
807
  msgstr ""
808
 
809
+ #: ../metaboxes.php:765
810
  msgid "Default is: 450 <b>(Note: just input number, example: 350)</b>"
811
  msgstr ""
812
 
813
+ #: ../metaboxes.php:771
814
  msgid ""
815
  "Default is: 670 or 1140 on <b>above</b> or <b>three row</b> layouts (Note: "
816
  "just input number, example: 650)</b>"
817
  msgstr ""
818
 
819
+ #: ../metaboxes.php:776
820
  msgid "Auto Play Slider?"
821
  msgstr ""
822
 
823
+ #: ../metaboxes.php:852
824
  msgid "Similar Portfolio Item Carousel"
825
  msgstr ""
826
 
827
+ #: ../metaboxes.php:853
828
  msgid "Display a carousel with similar portfolio items below project?"
829
  msgstr ""
830
 
831
+ #: ../metaboxes.php:858
832
  msgid "Yes - Display Recent Projects"
833
  msgstr ""
834
 
835
+ #: ../metaboxes.php:934
836
  msgid "Set image height"
837
  msgstr ""
838
 
839
+ #: ../metaboxes.php:935
840
  msgid "Default is 1:1 ratio <b>(Note: just input number, example: 350)</b>"
841
  msgstr ""
842
 
843
+ #: ../metaboxes.php:952
844
  msgid "Add Lightbox link in the top right of each item"
845
  msgstr ""
846
 
847
+ #: ../metaboxes.php:974
848
  msgid "Feature Options"
849
  msgstr ""
850
 
851
+ #: ../metaboxes.php:975
852
  msgid "If image slider make sure images uploaded are at least 1140px wide."
853
  msgstr ""
854
 
855
+ #: ../metaboxes.php:985 ../metaboxes.php:1131
856
  msgid "Slider Gallery"
857
  msgstr ""
858
 
859
+ #: ../metaboxes.php:992
860
  msgid "Default is: 400 <b>(Note: just input number, example: 350)</b>"
861
  msgstr ""
862
 
863
+ #: ../metaboxes.php:998
864
  msgid ""
865
  "Default is: 1140 <b>(Note: just input number, example: 650, does not apply "
866
  "to Carousel slider)</b>"
867
  msgstr ""
868
 
869
+ #: ../metaboxes.php:1003
870
  msgid "Use Lightbox for Feature Image"
871
  msgstr ""
872
 
873
+ #: ../metaboxes.php:1004
874
  msgid ""
875
  "If feature option is set to image, choose to use lightbox link with image."
876
  msgstr ""
877
 
878
+ #: ../metaboxes.php:1192
879
+ msgid "Image Slider - (Cropped Image Ratio)"
880
+ msgstr ""
881
+
882
+ #: ../metaboxes.php:1193 ../metaboxes.php:1335
883
+ msgid "Image Slider - (Different Image Ratio)"
884
+ msgstr ""
885
+
886
+ #: ../metaboxes.php:1194
887
+ msgid "Image Slider with thumbnails - (Cropped Image Ratio)"
888
+ msgstr ""
889
+
890
+ #: ../metaboxes.php:1195 ../metaboxes.php:1337
891
+ msgid "Image Carousel - (Muiltiple Images Showing At Once)"
892
+ msgstr ""
893
+
894
+ #: ../metaboxes.php:1196 ../metaboxes.php:1338
895
+ msgid "Image Collage - (Use 2 to 5 images)"
896
+ msgstr ""
897
+
898
+ #: ../metaboxes.php:1197
899
+ msgid "Shortcode"
900
+ msgstr ""
901
+
902
+ #: ../metaboxes.php:1203 ../metaboxes.php:1359
903
+ msgid "Add images for gallery here - Use large images"
904
+ msgstr ""
905
+
906
+ #: ../metaboxes.php:1209
907
+ msgid "Gallery Post Shortcode"
908
+ msgstr ""
909
+
910
+ #: ../metaboxes.php:1210
911
+ msgid "If using shortcode place here."
912
+ msgstr ""
913
+
914
+ #: ../metaboxes.php:1215 ../metaboxes.php:1376
915
+ msgid "Max Slider/Image Height"
916
+ msgstr ""
917
+
918
+ #: ../metaboxes.php:1216 ../metaboxes.php:1377
919
+ msgid "Note: just input number, example: 350"
920
+ msgstr ""
921
+
922
+ #: ../metaboxes.php:1221 ../metaboxes.php:1370
923
+ msgid "Max Slider/Image Width"
924
+ msgstr ""
925
+
926
+ #: ../metaboxes.php:1222 ../metaboxes.php:1279 ../metaboxes.php:1371
927
+ msgid "Note: just input number, example: 650"
928
+ msgstr ""
929
+
930
+ #: ../metaboxes.php:1237
931
+ msgid "Photo Collage - (Use 2 to 5 images)"
932
+ msgstr ""
933
+
934
+ #: ../metaboxes.php:1260
935
+ msgid "Video post embed"
936
+ msgstr ""
937
+
938
+ #: ../metaboxes.php:1261 ../metaboxes.php:1365
939
+ msgid ""
940
+ "Place url, embed code or shortcode, works with youtube, vimeo. (Use the "
941
+ "featured image for screen shot)"
942
+ msgstr ""
943
+
944
+ #: ../metaboxes.php:1266
945
+ msgid "Video Meta Title"
946
+ msgstr ""
947
+
948
+ #: ../metaboxes.php:1267 ../metaboxes.php:1273
949
+ msgid "Used for SEO purposes"
950
+ msgstr ""
951
+
952
+ #: ../metaboxes.php:1272
953
+ msgid "Video Meta description"
954
+ msgstr ""
955
+
956
+ #: ../metaboxes.php:1298
957
+ msgid "Quote Post Options"
958
+ msgstr ""
959
+
960
+ #: ../metaboxes.php:1303
961
+ msgid "Quote author"
962
+ msgstr ""
963
+
964
+ #: ../metaboxes.php:1311
965
+ msgid "Portfolio Options"
966
+ msgstr ""
967
+
968
+ #: ../metaboxes.php:1334
969
+ msgid "Image Slider (Cropped Image Ratio)"
970
+ msgstr ""
971
+
972
+ #: ../metaboxes.php:1336
973
+ msgid "Image Slider with thumbnails (Cropped Image Ratio)"
974
+ msgstr ""
975
+
976
+ #: ../metaboxes.php:1350
977
+ msgid "Two Columns"
978
+ msgstr ""
979
+
980
+ #: ../metaboxes.php:1351
981
+ msgid "Three Columns"
982
+ msgstr ""
983
+
984
+ #: ../metaboxes.php:1352
985
+ msgid "Four Columns"
986
+ msgstr ""
987
+
988
+ #: ../metaboxes.php:1353
989
+ msgid "Five Columns"
990
+ msgstr ""
991
+
992
+ #: ../metaboxes.php:1354
993
+ msgid "Six Columns"
994
+ msgstr ""
995
+
996
+ #: ../metaboxes.php:1358
997
+ msgid "Portfolio Image Gallery"
998
+ msgstr ""
999
+
1000
+ #: ../metaboxes.php:1364
1001
+ msgid "Video embed"
1002
+ msgstr ""
1003
+
1004
+ #: ../metaboxes.php:1384
1005
+ msgid "Portfolio Bottom Carousel Options"
1006
+ msgstr ""
1007
+
1008
+ #: ../metaboxes.php:1401
1009
+ msgid "Related Post Carousel"
1010
+ msgstr ""
1011
+
1012
+ #: ../metaboxes.php:1402
1013
+ msgid "Recent Portfolio Carousel"
1014
+ msgstr ""
1015
+
1016
+ #: ../metaboxes.php:1403
1017
+ msgid "No Carousel"
1018
+ msgstr ""
1019
+
1020
+ #: ../page-contact.php:12 ../template-contact.php:13
1021
  msgid "This field is required."
1022
  msgstr ""
1023
 
1024
+ #: ../page-contact.php:13 ../template-contact.php:14
1025
  msgid "Please enter a valid email address."
1026
  msgstr ""
1027
 
1028
+ #: ../page-contact.php:101 ../template-contact.php:104
1029
  msgid "Check your math."
1030
  msgstr ""
1031
 
1032
+ #: ../page-contact.php:106 ../template-contact.php:109
1033
  msgid "Please enter your name."
1034
  msgstr ""
1035
 
1036
+ #: ../page-contact.php:113 ../template-contact.php:116
1037
  msgid "Please enter your email address."
1038
  msgstr ""
1039
 
1040
+ #: ../page-contact.php:116 ../template-contact.php:119
1041
  msgid "You entered an invalid email address."
1042
  msgstr ""
1043
 
1044
+ #: ../page-contact.php:123 ../template-contact.php:126
1045
  msgid "Please enter a message."
1046
  msgstr ""
1047
 
1048
+ #: ../page-contact.php:144 ../pagetemplater.php:30 ../pagetemplater.php:128
1049
+ #: ../template-contact.php:147
1050
  msgid "Contact"
1051
  msgstr ""
1052
 
1053
+ #: ../page-contact.php:144 ../template-contact.php:147
1054
  msgid "From"
1055
  msgstr ""
1056
 
1057
+ #: ../page-contact.php:145 ../template-contact.php:148
1058
  msgid "Name"
1059
  msgstr ""
1060
 
1061
+ #: ../page-contact.php:146 ../template-contact.php:149
1062
  msgid "Email"
1063
  msgstr ""
1064
 
1065
+ #: ../page-contact.php:147 ../template-contact.php:150
1066
  msgid "Comments"
1067
  msgstr ""
1068
 
1069
+ #: ../page-contact.php:185 ../template-contact.php:185
1070
  msgid "Thanks, your email was sent successfully."
1071
  msgstr ""
1072
 
1073
+ #: ../page-contact.php:190 ../template-contact.php:189
1074
  msgid "Sorry, an error occured."
1075
  msgstr ""
1076
 
1077
+ #: ../page-contact.php:196 ../template-contact.php:195
1078
  msgid "Name:"
1079
  msgstr ""
1080
 
1081
+ #: ../page-contact.php:204 ../template-contact.php:205
1082
  msgid "Email:"
1083
  msgstr ""
1084
 
1085
+ #: ../page-contact.php:212 ../template-contact.php:212
1086
  msgid "Message:"
1087
  msgstr ""
1088
 
1089
+ #: ../page-contact.php:232 ../template-contact.php:230
1090
  msgid "Send Email"
1091
  msgstr ""
1092
 
1180
  msgid "You are not allowed to be here"
1181
  msgstr ""
1182
 
1183
+ #: ../shortcodes.php:171 ../shortcodes.php:174 ../shortcodes.php:197
1184
+ #: ../shortcodes.php:200
1185
  msgid "please specify correct url"
1186
  msgstr ""
1187
 
1438
  #: ../shortcodes/youtube/youtube_popup.php:66
1439
  msgid "YouTube Link"
1440
  msgstr ""
1441
+
1442
+ #: ../virtue_toolkit.php:84
1443
+ msgid "Basic Slider"
1444
+ msgstr ""
1445
+
1446
+ #: ../virtue_toolkit.php:84
1447
+ msgid "Post Carousel"
1448
+ msgstr ""
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: britner
3
  Tags:
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
- Stable tag: 4.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -43,6 +43,11 @@ Install the plugin into the `/wp-content/plugins/` folder, and activate it.
43
 
44
  == Changelog ==
45
 
 
 
 
 
 
46
  = 4.0 =
47
  * Update: add support for ascend
48
 
3
  Tags:
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
+ Stable tag: 4.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
43
 
44
  == Changelog ==
45
 
46
+ = 4.1 =
47
+ * Update: Add Kadence Image processing.
48
+ * Update: Add profile meta boxes.
49
+ * Update: Add extras for ascend support.
50
+
51
  = 4.0 =
52
  * Update: add support for ascend
53
 
virtue_toolkit.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Kadence Toolkit
5
  Description: Custom Portfolio and Shortcode functionality for free Kadence WordPress themes
6
- Version: 4.0
7
  Author: Kadence Themes
8
  Author URI: https://kadencethemes.com/
9
  License: GPLv2 or later
@@ -25,8 +25,10 @@ function kadencetoolkit_redux_args_new( $args ) {
25
  $args['save_defaults'] = true;
26
  return $args;
27
  }
 
28
  require_once('post-types.php');
29
  require_once('gallery.php');
 
30
  require_once('shortcodes.php');
31
  require_once('shortcode_ajax.php');
32
  require_once('pagetemplater.php');
@@ -63,3 +65,29 @@ function kadence_toolkit_flushpermalinks() {
63
  add_action('init', 'kadence_toolkit_flushpermalinks');
64
 
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /*
4
  Plugin Name: Kadence Toolkit
5
  Description: Custom Portfolio and Shortcode functionality for free Kadence WordPress themes
6
+ Version: 4.1
7
  Author: Kadence Themes
8
  Author URI: https://kadencethemes.com/
9
  License: GPLv2 or later
25
  $args['save_defaults'] = true;
26
  return $args;
27
  }
28
+ require_once('kadence_image_processing.php');
29
  require_once('post-types.php');
30
  require_once('gallery.php');
31
+ require_once('author_box.php');
32
  require_once('shortcodes.php');
33
  require_once('shortcode_ajax.php');
34
  require_once('pagetemplater.php');
65
  add_action('init', 'kadence_toolkit_flushpermalinks');
66
 
67
 
68
+ add_action( 'after_setup_theme', 'virtue_toolkit_add_in_slider_sections', 1);
69
+ function virtue_toolkit_add_in_slider_sections() {
70
+ $the_theme = wp_get_theme();
71
+ // Ascend only
72
+ if( $the_theme->get( 'Name' ) == 'Ascend' || $the_theme->get( 'Template') == 'ascend' ) {
73
+
74
+ if ( ! class_exists( 'Redux' ) ) {
75
+ return;
76
+ }
77
+ if(ReduxFramework::$_version <= '3.5.6') {
78
+ return;
79
+ }
80
+
81
+ $options_slug = 'ascend';
82
+ $home_header = Redux::getField($options_slug, 'home_header');
83
+ if(is_array($home_header)){
84
+ $hextras = array('basic' => __('Basic Slider', 'ascend'), 'basic_post_carousel' => __('Post Carousel', 'ascend'));
85
+ $home_header['options'] = array_merge($hextras, $home_header['options']);
86
+ }
87
+ Redux::setField($options_slug, $home_header);
88
+ }
89
+ }
90
+
91
+
92
+
93
+