Kadence Themes Toolkit - Version 2.6

Version Description

  • Fix for checkboxes not saving correctly.
  • Update security with contact forms.
  • add custom fields support to portfolio post.
Download this release

Release Info

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

Code changes from version 2.5 to 2.6

Files changed (6) hide show
  1. metaboxes.php +0 -2
  2. page-contact.php +14 -13
  3. post-types.php +1 -1
  4. readme.txt +6 -1
  5. template-contact.php +10 -8
  6. virtue_toolkit.php +1 -1
metaboxes.php CHANGED
@@ -919,14 +919,12 @@ $meta_boxes[] = array(
919
  'desc' => '',
920
  'id' => $prefix . 'portfolio_item_types',
921
  'type' => 'checkbox',
922
- 'std' => '1'
923
  ),
924
  array(
925
  'name' => __('Display Item Excerpt', 'kadencetoolkit'),
926
  'desc' => '',
927
  'id' => $prefix . 'portfolio_item_excerpt',
928
  'type' => 'checkbox',
929
- 'std' => '1'
930
  ),
931
  array(
932
  'name' => __('Add Lightbox link in the top right of each item', 'kadencetoolkit'),
919
  'desc' => '',
920
  'id' => $prefix . 'portfolio_item_types',
921
  'type' => 'checkbox',
 
922
  ),
923
  array(
924
  'name' => __('Display Item Excerpt', 'kadencetoolkit'),
925
  'desc' => '',
926
  'id' => $prefix . 'portfolio_item_excerpt',
927
  'type' => 'checkbox',
 
928
  ),
929
  array(
930
  'name' => __('Add Lightbox link in the top right of each item', 'kadencetoolkit'),
page-contact.php CHANGED
@@ -7,16 +7,17 @@ Template Name: Contact
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 );
10
- $form = get_post_meta( $post->ID, '_kad_contact_form', true ); ?>
11
- <script type="text/javascript">jQuery(document).ready(function ($) {$.extend($.validator.messages, {
12
- required: "<?php echo __('This field is required.', 'kadencetoolkit'); ?>",
13
- email: "<?php echo __('Please enter a valid email address.', 'kadencetoolkit'); ?>",
14
- });
15
- $("#contactForm").validate();
16
- });</script>
17
- <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/assets/js/jquery.validate.js"></script>
18
-
19
- <?php if ($map == 'yes') { ?>
 
20
  <script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
21
  <?php $address = get_post_meta( $post->ID, '_kad_contact_address', true );
22
  $maptype = get_post_meta( $post->ID, '_kad_contact_maptype', true );
@@ -188,7 +189,7 @@ Template Name: Contact
188
  <?php if(isset($nameError)) { ?>
189
  <span class="error"><?php echo esc_html($nameError);?></span>
190
  <?php } ?>
191
- <input type="text" name="contactName" id="contactName" value="<?php if(isset($_POST['contactName'])) echo $_POST['contactName'];?>" class="required requiredField full" />
192
  </p>
193
 
194
  <p>
@@ -196,7 +197,7 @@ Template Name: Contact
196
  <?php if(isset($emailError)) { ?>
197
  <span class="error"><?php echo esc_html($emailError);?></span>
198
  <?php } ?>
199
- <input type="text" name="email" id="email" value="<?php if(isset($_POST['email'])) echo $_POST['email'];?>" class="required requiredField email full" />
200
  </p>
201
 
202
  <p>
@@ -204,7 +205,7 @@ Template Name: Contact
204
  <?php if(isset($commentError)) { ?>
205
  <span class="error"><?php echo esc_html($commentError);?></span>
206
  <?php } ?>
207
- <textarea name="comments" id="commentsText" rows="10" class="required requiredField"><?php if(isset($_POST['comments'])) { if(function_exists('stripslashes')) { echo stripslashes($_POST['comments']); } else { echo $_POST['comments']; } } ?></textarea>
208
  </p>
209
  <?php if(isset($form_math) && $form_math == 'yes') {
210
  $one = rand(5, 50);
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 );
10
+ $form = get_post_meta( $post->ID, '_kad_contact_form', true );
11
+ if ($form == 'yes') { ?>
12
+ <script type="text/javascript">jQuery(document).ready(function ($) {$.extend($.validator.messages, {
13
+ required: "<?php echo __('This field is required.', 'kadencetoolkit'); ?>",
14
+ email: "<?php echo __('Please enter a valid email address.', 'kadencetoolkit'); ?>",
15
+ });
16
+ $("#contactForm").validate();
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
  <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 );
189
  <?php if(isset($nameError)) { ?>
190
  <span class="error"><?php echo esc_html($nameError);?></span>
191
  <?php } ?>
192
+ <input type="text" name="contactName" id="contactName" value="<?php if(isset($_POST['contactName'])) echo esc_attr($_POST['contactName']);?>" class="required requiredField full" />
193
  </p>
194
 
195
  <p>
197
  <?php if(isset($emailError)) { ?>
198
  <span class="error"><?php echo esc_html($emailError);?></span>
199
  <?php } ?>
200
+ <input type="text" name="email" id="email" value="<?php if(isset($_POST['email'])) echo esc_attr($_POST['email']);?>" class="required requiredField email full" />
201
  </p>
202
 
203
  <p>
205
  <?php if(isset($commentError)) { ?>
206
  <span class="error"><?php echo esc_html($commentError);?></span>
207
  <?php } ?>
208
+ <textarea name="comments" id="commentsText" rows="10" class="required requiredField"><?php if(isset($_POST['comments'])) { if(function_exists('stripslashes')) { echo esc_textarea(stripslashes($_POST['comments'])); } else { echo esc_textarea($_POST['comments']); } } ?></textarea>
209
  </p>
210
  <?php if(isset($form_math) && $form_math == 'yes') {
211
  $one = rand(5, 50);
post-types.php CHANGED
@@ -30,7 +30,7 @@ function kad_portfolio_post_init() {
30
  'hierarchical' => false,
31
  'menu_position' => 8,
32
  'menu_icon' => 'dashicons-format-gallery',
33
- 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'page-attributes', 'thumbnail', 'comments' )
34
  );
35
  // Initialize Taxonomy Labels
36
  $worklabels = array(
30
  'hierarchical' => false,
31
  'menu_position' => 8,
32
  'menu_icon' => 'dashicons-format-gallery',
33
+ 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'page-attributes', 'thumbnail', 'custom-fields', 'comments' )
34
  );
35
  // Initialize Taxonomy Labels
36
  $worklabels = array(
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: britner
3
  Tags:
4
  Requires at least: 3.5
5
  Tested up to: 4.1
6
- Stable tag: 2.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -22,6 +22,11 @@ Install the plugin into the `/wp-content/plugins/` folder, and activate it.
22
 
23
  == Changelog ==
24
 
 
 
 
 
 
25
  = 2.5 =
26
  * Fix for older versions of pinnacle
27
 
3
  Tags:
4
  Requires at least: 3.5
5
  Tested up to: 4.1
6
+ Stable tag: 2.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
22
 
23
  == Changelog ==
24
 
25
+ = 2.6 =
26
+ * Fix for checkboxes not saving correctly.
27
+ * Update security with contact forms.
28
+ * add custom fields support to portfolio post.
29
+
30
  = 2.5 =
31
  * Fix for older versions of pinnacle
32
 
template-contact.php CHANGED
@@ -2,7 +2,13 @@
2
  /*
3
  Template Name: Contact
4
  */
5
- get_header(); ?>
 
 
 
 
 
 
6
  <script type="text/javascript">jQuery(document).ready(function ($) {$.extend($.validator.messages, {
7
  required: "<?php echo __('This field is required.', 'kadencetoolkit'); ?>",
8
  email: "<?php echo __('Please enter a valid email address.', 'kadencetoolkit'); ?>",
@@ -10,7 +16,7 @@ get_header(); ?>
10
  $("#contactForm").validate();
11
  });</script>
12
  <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/assets/js/jquery.validate-ck.js"></script>
13
- <?php global $post; $map = get_post_meta( $post->ID, '_kad_contact_map', true );
14
  if ($map == 'yes') { ?>
15
  <script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
16
  <?php $address = get_post_meta( $post->ID, '_kad_contact_address', true );
@@ -86,9 +92,6 @@ get_header(); ?>
86
  <?php
87
  echo '<style type="text/css" media="screen">#map_address {height:'.$mapheight.'px;}</style>';
88
  }
89
-
90
- $pageemail = get_post_meta( $post->ID, '_kad_contact_form_email', true );
91
- $form_math = get_post_meta( $post->ID, '_kad_contact_form_math', true );
92
  if(isset($_POST['submitted'])) {
93
  if(isset($form_math) && $form_math == 'yes') {
94
  if(md5($_POST['kad_captcha']) != $_POST['hval']) {
@@ -150,8 +153,7 @@ get_header(); ?>
150
 
151
  <div id="content" class="container">
152
  <div class="row">
153
- <?php $form = get_post_meta( $post->ID, '_kad_contact_form', true );
154
- if ($form == 'yes') { ?>
155
  <div id="main" class="main col-md-5" role="main">
156
  <div class="postclass pageclass">
157
  <?php } else { ?>
@@ -201,7 +203,7 @@ get_header(); ?>
201
  <?php if(isset($commentError)) { ?>
202
  <span class="error"><?php echo esc_html($commentError);?></span>
203
  <?php } ?>
204
- <textarea name="comments" id="commentsText" rows="10" class="required requiredField"><?php if(isset($_POST['comments'])) { if(function_exists('stripslashes')) { echo stripslashes($_POST['comments']); } else { echo $_POST['comments']; } } ?></textarea>
205
  </p>
206
  <?php if(isset($form_math) && $form_math == 'yes') { ?>
207
  <?php $one = rand(5, 50);
2
  /*
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 );
10
+ $form_math = get_post_meta( $post->ID, '_kad_contact_form_math', true );
11
+ if ($form == 'yes') { ?>
12
  <script type="text/javascript">jQuery(document).ready(function ($) {$.extend($.validator.messages, {
13
  required: "<?php echo __('This field is required.', 'kadencetoolkit'); ?>",
14
  email: "<?php echo __('Please enter a valid email address.', 'kadencetoolkit'); ?>",
16
  $("#contactForm").validate();
17
  });</script>
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 );
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
  if(md5($_POST['kad_captcha']) != $_POST['hval']) {
153
 
154
  <div id="content" class="container">
155
  <div class="row">
156
+ <?php if ($form == 'yes') { ?>
 
157
  <div id="main" class="main col-md-5" role="main">
158
  <div class="postclass pageclass">
159
  <?php } else { ?>
203
  <?php if(isset($commentError)) { ?>
204
  <span class="error"><?php echo esc_html($commentError);?></span>
205
  <?php } ?>
206
+ <textarea name="comments" id="commentsText" rows="10" class="required requiredField"><?php if(isset($_POST['comments'])) { if(function_exists('stripslashes')) { echo esc_textarea(stripslashes($_POST['comments'])); } else { echo esc_textarea($_POST['comments']); } } ?></textarea>
207
  </p>
208
  <?php if(isset($form_math) && $form_math == 'yes') { ?>
209
  <?php $one = rand(5, 50);
virtue_toolkit.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Virtue / Pinnacle ToolKit
5
  Description: Custom Portfolio and Shortcode functionality for Virtue and Pinnacle Wordpress Theme
6
- Version: 2.5
7
  Author: Kadence Themes
8
  Author URI: http://kadencethemes.com/
9
  License: GPLv2 or later
3
  /*
4
  Plugin Name: Virtue / Pinnacle ToolKit
5
  Description: Custom Portfolio and Shortcode functionality for Virtue and Pinnacle Wordpress Theme
6
+ Version: 2.6
7
  Author: Kadence Themes
8
  Author URI: http://kadencethemes.com/
9
  License: GPLv2 or later