Date and Time Picker Field - Version 2.0.10

Version Description

  • Removed "value" from defaults
Download this release

Release Info

Developer PerS
Plugin Icon 128x128 Date and Time Picker Field
Version 2.0.10
Comparing to
See all releases

Code changes from version 2.0.9 to 2.0.10

acf-date_time_picker.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Advanced Custom Fields: Date and Time Picker
4
  Plugin URI: https://github.com/soderlind/acf-field-date-time-picker
5
  Description: Date and Time Picker field for Advanced Custom Fields
6
- Version: 2.0.9
7
  Author: Per Soderlind
8
  Author URI: http://soderlind.no
9
  License: GPLv2 or later
3
  Plugin Name: Advanced Custom Fields: Date and Time Picker
4
  Plugin URI: https://github.com/soderlind/acf-field-date-time-picker
5
  Description: Date and Time Picker field for Advanced Custom Fields
6
+ Version: 2.0.10
7
  Author: Per Soderlind
8
  Author URI: http://soderlind.no
9
  License: GPLv2 or later
date_time_picker-v3.php CHANGED
@@ -28,7 +28,6 @@ class acf_field_date_time_picker extends acf_Field {
28
  $this->title = __( 'Date and Time Picker' );
29
  $this->domain = 'acf-date_time_picker';
30
  $this->defaults = array(
31
- 'value' => ''
32
  , 'label' => __( 'Choose Time', $this->domain )
33
  , 'time_format' => 'hh:mm'
34
  , 'show_date' => 'true'
@@ -435,11 +434,11 @@ class acf_field_date_time_picker extends acf_Field {
435
 
436
  return $NewArray;
437
  }
438
-
439
  function get_js_locale($locale) {
440
  $dir_path = $this->settings['path'] . 'js/localization/';
441
  $exclude_list = array(".", "..");
442
- $languages = $this->ps_preg_filter("/jquery-ui-timepicker-(.*?)\.js/","$1",array_diff(scandir($dir_path), $exclude_list));
443
 
444
  $locale = strtolower(str_replace("_", "-", $locale));
445
 
28
  $this->title = __( 'Date and Time Picker' );
29
  $this->domain = 'acf-date_time_picker';
30
  $this->defaults = array(
 
31
  , 'label' => __( 'Choose Time', $this->domain )
32
  , 'time_format' => 'hh:mm'
33
  , 'show_date' => 'true'
434
 
435
  return $NewArray;
436
  }
437
+
438
  function get_js_locale($locale) {
439
  $dir_path = $this->settings['path'] . 'js/localization/';
440
  $exclude_list = array(".", "..");
441
+ $languages = $this->ps_preg_filter("/jquery-ui-timepicker-(.*?)\.js/","$1",array_diff(scandir($dir_path), $exclude_list));
442
 
443
  $locale = strtolower(str_replace("_", "-", $locale));
444
 
date_time_picker-v4.php CHANGED
@@ -25,8 +25,7 @@ class acf_field_date_time_picker extends acf_field
25
  $this->category = __("jQuery", $this->domain); // Basic, Content, Choice, etc
26
  $this->domain = 'acf-date_time_picker';
27
  $this->defaults = array(
28
- 'value' => ''
29
- , 'label' => __( 'Choose Time', $this->domain )
30
  , 'time_format' => 'h:mm tt'
31
  , 'show_date' => 'true'
32
  , 'date_format' => 'm/d/y'
@@ -231,7 +230,7 @@ class acf_field_date_time_picker extends acf_field
231
  }
232
  }
233
 
234
- function load_field_defaults( $field ) { return $field; }
235
 
236
  /*
237
  * load_value()
25
  $this->category = __("jQuery", $this->domain); // Basic, Content, Choice, etc
26
  $this->domain = 'acf-date_time_picker';
27
  $this->defaults = array(
28
+ 'label' => __( 'Choose Time', $this->domain )
 
29
  , 'time_format' => 'h:mm tt'
30
  , 'show_date' => 'true'
31
  , 'date_format' => 'm/d/y'
230
  }
231
  }
232
 
233
+ //function load_field_defaults( $field ) { return $field; }
234
 
235
  /*
236
  * load_value()
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://soderlind.no/donate/
4
  Tags: acf, custom field,datepicker,timepicker
5
  Requires at least: 3.4
6
  Tested up to: 3.6
7
- Stable tag: 2.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -110,6 +110,8 @@ TT AM or PM for AM/PM
110
  The Date and Time Picker field is saved as an UNIX timestamp. Use the PHP [date](http://php.net/manual/en/function.date.php) function when you use it in your theme.
111
 
112
  == Changelog ==
 
 
113
  = 2.0.9 =
114
  * Thanks to [flahertydaf](http://support.advancedcustomfields.com/forums/topic/custom-fields-get-emptied-when-publishing/page/2/#post-2325), the plugin in now working with the latest ACF version
115
  * Replaced DateTime::createFromFormat (PHP 5 >= 5.3.0), with strtotime
4
  Tags: acf, custom field,datepicker,timepicker
5
  Requires at least: 3.4
6
  Tested up to: 3.6
7
+ Stable tag: 2.0.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
110
  The Date and Time Picker field is saved as an UNIX timestamp. Use the PHP [date](http://php.net/manual/en/function.date.php) function when you use it in your theme.
111
 
112
  == Changelog ==
113
+ = 2.0.10 =
114
+ * Removed "value" from defaults
115
  = 2.0.9 =
116
  * Thanks to [flahertydaf](http://support.advancedcustomfields.com/forums/topic/custom-fields-get-emptied-when-publishing/page/2/#post-2325), the plugin in now working with the latest ACF version
117
  * Replaced DateTime::createFromFormat (PHP 5 >= 5.3.0), with strtotime