Contact Form 7 Datepicker - Version 0.7.1

Version Description

  • Bugfix: fixed calendar not popping out when no id attribute specified in CF7 shortcode
Download this release

Release Info

Developer shockware
Plugin Icon wp plugin Contact Form 7 Datepicker
Version 0.7.1
Comparing to
See all releases

Code changes from version 0.7 to 0.7.1

Files changed (2) hide show
  1. contact-form-7-datepicker.php +6 -6
  2. readme.txt +6 -3
contact-form-7-datepicker.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Contact Form 7 Datepicker
4
  Plugin URI: https://github.com/relu/contact-form-7-datepicker/
5
  Description: Implements a new [date] tag in Contact Form 7 that adds a date field to a form. When clicking the field a calendar pops up enabling your site visitors to easily select any date. Now you can use the [datepicker] shortcode outside of CF7.
6
  Author: Aurel Canciu
7
- Version: 0.7
8
  Author URI: https://github.com/relu/
9
  */
10
  ?>
@@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28
  ?>
29
  <?php
30
 
31
- define('CF7_DATE_PICKER_VERSION', '0.7');
32
  define('PLUGIN_PATH', '/wp-content/plugins/'.plugin_basename(dirname(__FILE__)));
33
 
34
  if (!defined('CF7_DATE_PICKER_ENQUEUES')) {
@@ -538,14 +538,14 @@ You can of course put whatever divider you want between them.<br /></p>',
538
  if (!is_array($data)) {
539
  $name = $data;
540
  } else {
541
- $name = (string) $data['name'];
542
  }
543
 
544
  if (is_array($data) && isset($data['atts']['id'])) {
545
  $data['atts']['id'] = preg_replace('/[^A-Za-z0-9]/', '', $data['atts']['id']);
546
  $id = $data['atts']['id'];
547
  } else {
548
- $name = preg_replace('/[^A-Za-z0-9]/', '', $data);
549
  $id = $name;
550
  }
551
 
@@ -571,7 +571,7 @@ You can of course put whatever divider you want between them.<br /></p>',
571
 
572
  $attributes = '';
573
 
574
- if (is_array($data) && is_array($data['atts'])) {
575
  foreach ($data['atts'] as $key => $val) {
576
  if (!empty($val))
577
  $attributes .= $key.'="'.$val.'" ';
@@ -750,7 +750,7 @@ You can of course put whatever divider you want between them.<br /></p>',
750
  $data = array(
751
  "name" => ($name) ? "{$name}" : "{$id}",
752
  "atts" => array(
753
- "id" => "{$id}",
754
  "class" => "{$class}"),
755
  "opts" => array(
756
  "newfield" => "{$newfield}"),
4
  Plugin URI: https://github.com/relu/contact-form-7-datepicker/
5
  Description: Implements a new [date] tag in Contact Form 7 that adds a date field to a form. When clicking the field a calendar pops up enabling your site visitors to easily select any date. Now you can use the [datepicker] shortcode outside of CF7.
6
  Author: Aurel Canciu
7
+ Version: 0.7.1
8
  Author URI: https://github.com/relu/
9
  */
10
  ?>
28
  ?>
29
  <?php
30
 
31
+ define('CF7_DATE_PICKER_VERSION', '0.7.1');
32
  define('PLUGIN_PATH', '/wp-content/plugins/'.plugin_basename(dirname(__FILE__)));
33
 
34
  if (!defined('CF7_DATE_PICKER_ENQUEUES')) {
538
  if (!is_array($data)) {
539
  $name = $data;
540
  } else {
541
+ $name = $data['name'];
542
  }
543
 
544
  if (is_array($data) && isset($data['atts']['id'])) {
545
  $data['atts']['id'] = preg_replace('/[^A-Za-z0-9]/', '', $data['atts']['id']);
546
  $id = $data['atts']['id'];
547
  } else {
548
+ $name = preg_replace('/[^A-Za-z0-9]/', '', $name);
549
  $id = $name;
550
  }
551
 
571
 
572
  $attributes = '';
573
 
574
+ if (is_array($data) && !empty($data['atts']['id'])) {
575
  foreach ($data['atts'] as $key => $val) {
576
  if (!empty($val))
577
  $attributes .= $key.'="'.$val.'" ';
750
  $data = array(
751
  "name" => ($name) ? "{$name}" : "{$id}",
752
  "atts" => array(
753
+ "id" => ($id) ? "{$id}" : "{$name}",
754
  "class" => "{$class}"),
755
  "opts" => array(
756
  "newfield" => "{$newfield}"),
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:
4
  Tags: wordpress, datepicker, calendar, contact form 7, forms
5
  Requires at least: WordPress 2.9
6
  Tested up to: WordPress 3.2.1
7
- Stable tag: 0.7
8
 
9
  Datepicker for Contact Form 7 Wordpress Plugin based on jsDatePick script.
10
 
@@ -59,6 +59,9 @@ You can contact me anywhere and I'll add them to the project :)
59
 
60
  == Changelog ==
61
 
 
 
 
62
  = 0.7 =
63
  * New:
64
  - Added new [datepicker] tag to use outside of CF7
@@ -130,6 +133,6 @@ First release
130
 
131
  == Upgrade Notice ==
132
 
133
- = 0.5 =
134
 
135
- This should now work _out of the box_ for everyone, do upgrade!
4
  Tags: wordpress, datepicker, calendar, contact form 7, forms
5
  Requires at least: WordPress 2.9
6
  Tested up to: WordPress 3.2.1
7
+ Stable tag: 0.7.1
8
 
9
  Datepicker for Contact Form 7 Wordpress Plugin based on jsDatePick script.
10
 
59
 
60
  == Changelog ==
61
 
62
+ = 0.7.1 =
63
+ * Bugfix: fixed calendar not popping out when no id attribute specified in CF7 shortcode
64
+
65
  = 0.7 =
66
  * New:
67
  - Added new [datepicker] tag to use outside of CF7
133
 
134
  == Upgrade Notice ==
135
 
136
+ = 0.7.1 =
137
 
138
+ If you installed 0.7, do upgrade quick! This will fix all issues!