Version Description
- Update: Contact page template in 4.7
Download this release
Release Info
Developer | britner |
Plugin | Kadence Themes Toolkit |
Version | 3.7 |
Comparing to | |
See all releases |
Code changes from version 3.4 to 3.7
- gallery.php +3 -3
- metaboxes.php +2 -8
- page-contact.php +19 -11
- pagetemplater.php +11 -1
- readme.txt +15 -6
- template-contact.php +69 -59
- virtue_toolkit.php +4 -4
gallery.php
CHANGED
@@ -28,7 +28,7 @@ function kt_toolkit_get_srcset($width,$height,$url,$id) {
|
|
28 |
'file'=> $flyfilename,
|
29 |
'width' => $width,
|
30 |
'height' => $height,
|
31 |
-
'mime-type' => $image_meta['sizes']['thumbnail']['mime-type']
|
32 |
)
|
33 |
);
|
34 |
$image_meta['sizes'] = array_merge($image_meta['sizes'], $kt_add_imagesize);
|
@@ -41,7 +41,7 @@ function kt_toolkit_get_srcset($width,$height,$url,$id) {
|
|
41 |
'file'=> $retinaflyfilename,
|
42 |
'width' => 2 * $width,
|
43 |
'height' => 2 * $height,
|
44 |
-
'mime-type' => $image_meta['sizes']['thumbnail']['mime-type']
|
45 |
)
|
46 |
);
|
47 |
$image_meta['sizes'] = array_merge($image_meta['sizes'], $kt_add_imagesize_retina);
|
@@ -167,7 +167,7 @@ function kadence_shortcode_gallery($attr) {
|
|
167 |
$i = 0;
|
168 |
foreach ($attachments as $id => $attachment) {
|
169 |
$attachment_url = wp_get_attachment_url($id);
|
170 |
-
$image = aq_resize($attachment_url, $imgsize, $imgsize, true, false);
|
171 |
if(empty($image[0])) {$image = array($attachment_url,$imgsize,$imgsize);}
|
172 |
$img_srcset_output = kt_toolkit_get_srcset_output( $image[1], $image[2], $attachment_url, $id);
|
173 |
if($lightboxsize != 'full') {
|
28 |
'file'=> $flyfilename,
|
29 |
'width' => $width,
|
30 |
'height' => $height,
|
31 |
+
'mime-type' => isset($image_meta['sizes']['thumbnail']) ? $image_meta['sizes']['thumbnail']['mime-type'] : '',
|
32 |
)
|
33 |
);
|
34 |
$image_meta['sizes'] = array_merge($image_meta['sizes'], $kt_add_imagesize);
|
41 |
'file'=> $retinaflyfilename,
|
42 |
'width' => 2 * $width,
|
43 |
'height' => 2 * $height,
|
44 |
+
'mime-type' => isset($image_meta['sizes']['thumbnail']) ? $image_meta['sizes']['thumbnail']['mime-type'] : '',
|
45 |
)
|
46 |
);
|
47 |
$image_meta['sizes'] = array_merge($image_meta['sizes'], $kt_add_imagesize_retina);
|
167 |
$i = 0;
|
168 |
foreach ($attachments as $id => $attachment) {
|
169 |
$attachment_url = wp_get_attachment_url($id);
|
170 |
+
$image = aq_resize($attachment_url, $imgsize, $imgsize, true, false, false, $id);
|
171 |
if(empty($image[0])) {$image = array($attachment_url,$imgsize,$imgsize);}
|
172 |
$img_srcset_output = kt_toolkit_get_srcset_output( $image[1], $image[2], $attachment_url, $id);
|
173 |
if($lightboxsize != 'full') {
|
metaboxes.php
CHANGED
@@ -556,12 +556,6 @@ $meta_boxes[] = array(
|
|
556 |
'id' => $prefix . 'image_gallery',
|
557 |
'type' => 'kad_gallery',
|
558 |
),
|
559 |
-
array(
|
560 |
-
'name' => __('If Cyclone Slider', 'virtue-toolkit'),
|
561 |
-
'desc' => __('Paste Cyclone slider shortcode here (example: [cycloneslider id="slider1"])', 'virtue-toolkit'),
|
562 |
-
'id' => $prefix . 'shortcode_slider',
|
563 |
-
'type' => 'textarea_code',
|
564 |
-
),
|
565 |
array(
|
566 |
'name' => __('Max Image/Slider Height', 'virtue-toolkit'),
|
567 |
'desc' => __('Default is: 400 (Note: just input number, example: 350)', 'virtue-toolkit'),
|
@@ -626,7 +620,7 @@ $meta_boxes[] = array(
|
|
626 |
),
|
627 |
array(
|
628 |
'name' => __('Use Map', 'virtue-toolkit'),
|
629 |
-
'desc' => '',
|
630 |
'id' => $prefix .'contact_map',
|
631 |
'type' => 'select',
|
632 |
'options' => array(
|
@@ -1061,7 +1055,7 @@ $meta_boxes[] = array(
|
|
1061 |
),
|
1062 |
array(
|
1063 |
'name' => __('Use Map', 'virtue-toolkit'),
|
1064 |
-
'desc' => '',
|
1065 |
'id' => $prefix .'contact_map',
|
1066 |
'type' => 'select',
|
1067 |
'options' => array(
|
556 |
'id' => $prefix . 'image_gallery',
|
557 |
'type' => 'kad_gallery',
|
558 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
559 |
array(
|
560 |
'name' => __('Max Image/Slider Height', 'virtue-toolkit'),
|
561 |
'desc' => __('Default is: 400 (Note: just input number, example: 350)', 'virtue-toolkit'),
|
620 |
),
|
621 |
array(
|
622 |
'name' => __('Use Map', 'virtue-toolkit'),
|
623 |
+
'desc' => __('You need free api for google maps to work, add in the theme options > misc settings.', 'virtue-toolkit'),
|
624 |
'id' => $prefix .'contact_map',
|
625 |
'type' => 'select',
|
626 |
'options' => array(
|
1055 |
),
|
1056 |
array(
|
1057 |
'name' => __('Use Map', 'virtue-toolkit'),
|
1058 |
+
'desc' => __('You need free api for google maps to work, add in the theme options > misc settings.', 'virtue-toolkit'),
|
1059 |
'id' => $prefix .'contact_map',
|
1060 |
'type' => 'select',
|
1061 |
'options' => array(
|
page-contact.php
CHANGED
@@ -2,8 +2,7 @@
|
|
2 |
/*
|
3 |
Template Name: Contact
|
4 |
*/
|
5 |
-
|
6 |
-
<?php global $virtue, $post;
|
7 |
$map = get_post_meta( $post->ID, '_kad_contact_map', true );
|
8 |
$form_math = get_post_meta( $post->ID, '_kad_contact_form_math', true );
|
9 |
$contactformtitle = get_post_meta( $post->ID, '_kad_contact_form_title', true );
|
@@ -17,13 +16,16 @@ Template Name: Contact
|
|
17 |
});</script>
|
18 |
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/assets/js/jquery.validate.js"></script>
|
19 |
<?php }
|
20 |
-
if ($map == 'yes') {
|
21 |
-
|
22 |
-
<?php $address = get_post_meta( $post->ID, '_kad_contact_address', true );
|
23 |
$maptype = get_post_meta( $post->ID, '_kad_contact_maptype', true );
|
24 |
$height = get_post_meta( $post->ID, '_kad_contact_mapheight', true );
|
25 |
$mapzoom = get_post_meta( $post->ID, '_kad_contact_zoom', true );
|
26 |
-
|
|
|
|
|
|
|
|
|
27 |
if(!empty($height)) {
|
28 |
$mapheight = $height;
|
29 |
} else {
|
@@ -34,13 +36,14 @@ Template Name: Contact
|
|
34 |
} else {
|
35 |
$zoom = 15;
|
36 |
} ?>
|
|
|
37 |
<script type="text/javascript">
|
38 |
jQuery(window).load(function() {
|
39 |
jQuery('#map_address').gmap3({
|
40 |
map: {
|
41 |
-
address:"<?php echo $address;?>",
|
42 |
options: {
|
43 |
-
zoom:<?php echo $zoom;?>,
|
44 |
draggable: true,
|
45 |
mapTypeControl: true,
|
46 |
mapTypeId: google.maps.MapTypeId.<?php echo esc_attr($maptype);?>,
|
@@ -54,8 +57,8 @@ Template Name: Contact
|
|
54 |
},
|
55 |
marker:{
|
56 |
values:[
|
57 |
-
{address: "<?php echo $address;?>",
|
58 |
-
data:"<div class='mapinfo'>'<?php echo $address;?>'</div>",
|
59 |
},
|
60 |
],
|
61 |
options:{
|
@@ -93,7 +96,8 @@ Template Name: Contact
|
|
93 |
|
94 |
if(isset($_POST['submitted'])) {
|
95 |
if(isset($form_math) && $form_math == 'yes') {
|
96 |
-
|
|
|
97 |
$kad_captchaError = __('Check your math.', 'virtue-toolkit');
|
98 |
$hasError = true;
|
99 |
}
|
@@ -127,6 +131,10 @@ Template Name: Contact
|
|
127 |
}
|
128 |
|
129 |
if(!isset($hasError)) {
|
|
|
|
|
|
|
|
|
130 |
if (isset($virtue['contact_email'])) {
|
131 |
$emailTo = $virtue['contact_email'];
|
132 |
} else {
|
2 |
/*
|
3 |
Template Name: Contact
|
4 |
*/
|
5 |
+
global $virtue, $post;
|
|
|
6 |
$map = get_post_meta( $post->ID, '_kad_contact_map', true );
|
7 |
$form_math = get_post_meta( $post->ID, '_kad_contact_form_math', true );
|
8 |
$contactformtitle = get_post_meta( $post->ID, '_kad_contact_form_title', true );
|
16 |
});</script>
|
17 |
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/assets/js/jquery.validate.js"></script>
|
18 |
<?php }
|
19 |
+
if ($map == 'yes') {
|
20 |
+
$address = get_post_meta( $post->ID, '_kad_contact_address', true );
|
|
|
21 |
$maptype = get_post_meta( $post->ID, '_kad_contact_maptype', true );
|
22 |
$height = get_post_meta( $post->ID, '_kad_contact_mapheight', true );
|
23 |
$mapzoom = get_post_meta( $post->ID, '_kad_contact_zoom', true );
|
24 |
+
if(isset($virtue['google_map_api']) && !empty($virtue['google_map_api'])) {
|
25 |
+
$gmap_api = $virtue['google_map_api'];
|
26 |
+
} else {
|
27 |
+
$gmap_api = 'AIzaSyBt7JOCM4XQTEi9jzdqB8alFc1Vm_3mbfQ';
|
28 |
+
}
|
29 |
if(!empty($height)) {
|
30 |
$mapheight = $height;
|
31 |
} else {
|
36 |
} else {
|
37 |
$zoom = 15;
|
38 |
} ?>
|
39 |
+
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=<?php echo esc_attr($gmap_api);?>"></script>
|
40 |
<script type="text/javascript">
|
41 |
jQuery(window).load(function() {
|
42 |
jQuery('#map_address').gmap3({
|
43 |
map: {
|
44 |
+
address:"<?php echo esc_js($address);?>",
|
45 |
options: {
|
46 |
+
zoom:<?php echo esc_js($zoom);?>,
|
47 |
draggable: true,
|
48 |
mapTypeControl: true,
|
49 |
mapTypeId: google.maps.MapTypeId.<?php echo esc_attr($maptype);?>,
|
57 |
},
|
58 |
marker:{
|
59 |
values:[
|
60 |
+
{address: "<?php echo esc_js($address);?>",
|
61 |
+
data:"<div class='mapinfo'>'<?php echo esc_js($address);?>'</div>",
|
62 |
},
|
63 |
],
|
64 |
options:{
|
96 |
|
97 |
if(isset($_POST['submitted'])) {
|
98 |
if(isset($form_math) && $form_math == 'yes') {
|
99 |
+
$math_answer = trim($_POST['kad_captcha']);
|
100 |
+
if(md5($math_answer) != $_POST['hval']) {
|
101 |
$kad_captchaError = __('Check your math.', 'virtue-toolkit');
|
102 |
$hasError = true;
|
103 |
}
|
131 |
}
|
132 |
|
133 |
if(!isset($hasError)) {
|
134 |
+
$name = wp_filter_kses( $name );
|
135 |
+
$email = wp_filter_kses( $email );
|
136 |
+
$comments = wp_filter_kses( $comments );
|
137 |
+
|
138 |
if (isset($virtue['contact_email'])) {
|
139 |
$emailTo = $virtue['contact_email'];
|
140 |
} else {
|
pagetemplater.php
CHANGED
@@ -24,6 +24,8 @@ class Kadence_Page_Templater_Pinnacle {
|
|
24 |
|
25 |
add_filter('template_include', array( $this, 'view_project_template') );
|
26 |
|
|
|
|
|
27 |
$this->templates = array(
|
28 |
'template-contact.php' => __('Contact', 'virtue-toolkit'),
|
29 |
);
|
@@ -35,7 +37,7 @@ class Kadence_Page_Templater_Pinnacle {
|
|
35 |
// Create the key used for the themes cache
|
36 |
$cache_key = 'page_templates-' . md5( get_theme_root() . '/' . get_stylesheet() );
|
37 |
|
38 |
-
|
39 |
|
40 |
if ( empty( $templates ) ) {
|
41 |
$templates = array();
|
@@ -54,7 +56,15 @@ class Kadence_Page_Templater_Pinnacle {
|
|
54 |
return $atts;
|
55 |
|
56 |
}
|
|
|
|
|
|
|
|
|
57 |
|
|
|
|
|
|
|
|
|
58 |
/**
|
59 |
* Checks if the template is assigned to the page
|
60 |
*/
|
24 |
|
25 |
add_filter('template_include', array( $this, 'view_project_template') );
|
26 |
|
27 |
+
add_filter('theme_page_templates', array( $this, 'register_project_templates_update') );
|
28 |
+
|
29 |
$this->templates = array(
|
30 |
'template-contact.php' => __('Contact', 'virtue-toolkit'),
|
31 |
);
|
37 |
// Create the key used for the themes cache
|
38 |
$cache_key = 'page_templates-' . md5( get_theme_root() . '/' . get_stylesheet() );
|
39 |
|
40 |
+
$templates = wp_get_theme()->get_page_templates();
|
41 |
|
42 |
if ( empty( $templates ) ) {
|
43 |
$templates = array();
|
56 |
return $atts;
|
57 |
|
58 |
}
|
59 |
+
public function register_project_templates_update($templates ) {
|
60 |
+
if ( ! version_compare( $GLOBALS['wp_version'], '4.7', '<' ) ) {
|
61 |
+
|
62 |
+
$templates = array_merge( $templates, $this->templates );
|
63 |
|
64 |
+
}
|
65 |
+
return $templates;
|
66 |
+
|
67 |
+
}
|
68 |
/**
|
69 |
* Checks if the template is assigned to the page
|
70 |
*/
|
readme.txt
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
-
===
|
2 |
Contributors: britner
|
3 |
Tags:
|
4 |
Requires at least: 4.0
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 3.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
-
Custom Portfolio and Shortcode functionality for
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
Custom Portfolio and Shortcode functionality for
|
15 |
|
16 |
Not intended to work with any other themes.
|
17 |
|
@@ -31,7 +31,7 @@ Not intended to work with any other themes.
|
|
31 |
|
32 |
* **Contact Form Page Template** - includes page template that has options for a google map and a contact form.
|
33 |
|
34 |
-
* **Gallery Styling for Wordpress Gallery** - this allows the Kadence Theme to override the
|
35 |
|
36 |
* **Gallery Metaboxs for post and pages** - allows for a gallery to be added to a post for a post slider or page for page slider using the featured template.
|
37 |
|
@@ -43,6 +43,15 @@ Install the plugin into the `/wp-content/plugins/` folder, and activate it.
|
|
43 |
|
44 |
== Changelog ==
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
= 3.4 =
|
47 |
* fix: Img src set for gallery.
|
48 |
|
1 |
+
=== Kadence Themes ToolKit ===
|
2 |
Contributors: britner
|
3 |
Tags:
|
4 |
Requires at least: 4.0
|
5 |
+
Tested up to: 4.7
|
6 |
+
Stable tag: 3.7
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
+
Custom Portfolio and Shortcode functionality for free Kadence WordPress Themes
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
Custom Portfolio and Shortcode functionality for free Kadence WordPress Themes, by Kadence Themes
|
15 |
|
16 |
Not intended to work with any other themes.
|
17 |
|
31 |
|
32 |
* **Contact Form Page Template** - includes page template that has options for a google map and a contact form.
|
33 |
|
34 |
+
* **Gallery Styling for Wordpress Gallery** - this allows the Kadence Theme to override the WordPress gallery with theme specific styling. You can turn this off in the theme options > misc settings.
|
35 |
|
36 |
* **Gallery Metaboxs for post and pages** - allows for a gallery to be added to a post for a post slider or page for page slider using the featured template.
|
37 |
|
43 |
|
44 |
== Changelog ==
|
45 |
|
46 |
+
= 3.7 =
|
47 |
+
* Update: Contact page template in 4.7
|
48 |
+
|
49 |
+
= 3.6 =
|
50 |
+
* Update: Few Small updates
|
51 |
+
|
52 |
+
= 3.5 =
|
53 |
+
* fix: Img src set for gallery.
|
54 |
+
|
55 |
= 3.4 =
|
56 |
* fix: Img src set for gallery.
|
57 |
|
template-contact.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Template Name: Contact
|
4 |
*/
|
5 |
get_header();
|
6 |
-
global $post;
|
7 |
$form = get_post_meta( $post->ID, '_kad_contact_form', true );
|
8 |
$map = get_post_meta( $post->ID, '_kad_contact_map', true );
|
9 |
$pageemail = get_post_meta( $post->ID, '_kad_contact_form_email', true );
|
@@ -18,11 +18,15 @@ global $post;
|
|
18 |
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/assets/js/jquery.validate-ck.js"></script>
|
19 |
<?php }
|
20 |
if ($map == 'yes') { ?>
|
21 |
-
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
|
22 |
<?php $address = get_post_meta( $post->ID, '_kad_contact_address', true );
|
23 |
$maptype = get_post_meta( $post->ID, '_kad_contact_maptype', true );
|
24 |
$height = get_post_meta( $post->ID, '_kad_contact_mapheight', true );
|
25 |
-
$mapzoom = get_post_meta( $post->ID, '_kad_contact_zoom', true );
|
|
|
|
|
|
|
|
|
|
|
26 |
if(!empty($height)) {
|
27 |
$mapheight = $height;
|
28 |
} else {
|
@@ -33,68 +37,70 @@ global $post;
|
|
33 |
} else {
|
34 |
$zoom = 15;
|
35 |
} ?>
|
36 |
-
<script type="text/javascript">
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
91 |
|
92 |
<?php
|
93 |
echo '<style type="text/css" media="screen">#map_address {height:'.$mapheight.'px;}</style>';
|
94 |
}
|
95 |
if(isset($_POST['submitted'])) {
|
96 |
if(isset($form_math) && $form_math == 'yes') {
|
97 |
-
|
|
|
98 |
$kad_captchaError = __('Check your math.', 'virtue-toolkit');
|
99 |
$hasError = true;
|
100 |
}
|
@@ -128,6 +134,10 @@ global $post;
|
|
128 |
}
|
129 |
|
130 |
if(!isset($hasError)) {
|
|
|
|
|
|
|
|
|
131 |
if (isset($pageemail)) {
|
132 |
$emailTo = $pageemail;
|
133 |
} else {
|
3 |
Template Name: Contact
|
4 |
*/
|
5 |
get_header();
|
6 |
+
global $post, $pinnacle;
|
7 |
$form = get_post_meta( $post->ID, '_kad_contact_form', true );
|
8 |
$map = get_post_meta( $post->ID, '_kad_contact_map', true );
|
9 |
$pageemail = get_post_meta( $post->ID, '_kad_contact_form_email', true );
|
18 |
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/assets/js/jquery.validate-ck.js"></script>
|
19 |
<?php }
|
20 |
if ($map == 'yes') { ?>
|
|
|
21 |
<?php $address = get_post_meta( $post->ID, '_kad_contact_address', true );
|
22 |
$maptype = get_post_meta( $post->ID, '_kad_contact_maptype', true );
|
23 |
$height = get_post_meta( $post->ID, '_kad_contact_mapheight', true );
|
24 |
+
$mapzoom = get_post_meta( $post->ID, '_kad_contact_zoom', true );
|
25 |
+
if(isset($pinnacle['google_map_api']) && !empty($pinnacle['google_map_api'])) {
|
26 |
+
$gmap_api = $pinnacle['google_map_api'];
|
27 |
+
} else {
|
28 |
+
$gmap_api = 'AIzaSyBt7JOCM4XQTEi9jzdqB8alFc1Vm_3mbfQ';
|
29 |
+
}
|
30 |
if(!empty($height)) {
|
31 |
$mapheight = $height;
|
32 |
} else {
|
37 |
} else {
|
38 |
$zoom = 15;
|
39 |
} ?>
|
40 |
+
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=<?php echo esc_attr($gmap_api);?>"></script>
|
41 |
+
<script type="text/javascript">
|
42 |
+
jQuery(window).load(function() {
|
43 |
+
jQuery('#map_address').gmap3({
|
44 |
+
map: {
|
45 |
+
address:"<?php echo esc_js($address);?>",
|
46 |
+
options: {
|
47 |
+
zoom:<?php echo esc_js($zoom);?>,
|
48 |
+
draggable: true,
|
49 |
+
mapTypeControl: true,
|
50 |
+
mapTypeId: google.maps.MapTypeId.<?php echo esc_js($maptype);?>,
|
51 |
+
scrollwheel: false,
|
52 |
+
panControl: true,
|
53 |
+
rotateControl: false,
|
54 |
+
scaleControl: true,
|
55 |
+
streetViewControl: true,
|
56 |
+
zoomControl: true
|
57 |
+
}
|
58 |
+
},
|
59 |
+
marker:{
|
60 |
+
values:[
|
61 |
+
{
|
62 |
+
address: "<?php echo esc_js($address);?>",
|
63 |
+
data:"<div class='mapinfo'>'<?php echo esc_js($address);?>'</div>",
|
64 |
+
},
|
65 |
+
],
|
66 |
+
options:{
|
67 |
+
draggable: false,
|
68 |
+
},
|
69 |
+
events:{
|
70 |
+
click: function(marker, event, context){
|
71 |
+
var map = jQuery(this).gmap3("get"),
|
72 |
+
infowindow = jQuery(this).gmap3({get:{name:"infowindow"}});
|
73 |
+
if (infowindow){
|
74 |
+
infowindow.open(map, marker);
|
75 |
+
infowindow.setContent(context.data);
|
76 |
+
} else {
|
77 |
+
jQuery(this).gmap3({
|
78 |
+
infowindow:{
|
79 |
+
anchor:marker,
|
80 |
+
options:{content: context.data}
|
81 |
+
}
|
82 |
+
});
|
83 |
+
}
|
84 |
+
},
|
85 |
+
closeclick: function(){
|
86 |
+
var infowindow = jQuery(this).gmap3({get:{name:"infowindow"}});
|
87 |
+
if (infowindow){
|
88 |
+
infowindow.close();
|
89 |
+
}
|
90 |
+
}
|
91 |
+
}
|
92 |
+
}
|
93 |
+
});
|
94 |
+
});
|
95 |
+
</script>
|
96 |
|
97 |
<?php
|
98 |
echo '<style type="text/css" media="screen">#map_address {height:'.$mapheight.'px;}</style>';
|
99 |
}
|
100 |
if(isset($_POST['submitted'])) {
|
101 |
if(isset($form_math) && $form_math == 'yes') {
|
102 |
+
$math_answer = trim($_POST['kad_captcha']);
|
103 |
+
if(md5($math_answer) != $_POST['hval']) {
|
104 |
$kad_captchaError = __('Check your math.', 'virtue-toolkit');
|
105 |
$hasError = true;
|
106 |
}
|
134 |
}
|
135 |
|
136 |
if(!isset($hasError)) {
|
137 |
+
$name = wp_filter_kses( $name );
|
138 |
+
$email = wp_filter_kses( $email );
|
139 |
+
$comments = wp_filter_kses( $comments );
|
140 |
+
|
141 |
if (isset($pageemail)) {
|
142 |
$emailTo = $pageemail;
|
143 |
} else {
|
virtue_toolkit.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
/*
|
4 |
-
Plugin Name:
|
5 |
-
Description: Custom Portfolio and Shortcode functionality for
|
6 |
-
Version: 3.
|
7 |
Author: Kadence Themes
|
8 |
-
Author URI:
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|
1 |
<?php
|
2 |
|
3 |
/*
|
4 |
+
Plugin Name: Kadence ToolKit
|
5 |
+
Description: Custom Portfolio and Shortcode functionality for free Kadence WordPress themes
|
6 |
+
Version: 3.7
|
7 |
Author: Kadence Themes
|
8 |
+
Author URI: https://kadencethemes.com/
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|