Smart Custom Fields - Version 2.2.1

Version Description

  • Fix bug boolean field in repeatable group #39
  • Fix bug datepicker and colorpicker in repeatable group #41
Download this release

Release Info

Developer inc2734
Plugin Icon wp plugin Smart Custom Fields
Version 2.2.1
Comparing to
See all releases

Code changes from version 2.2.0 to 2.2.1

classes/fields/class.field-boolean.php CHANGED
@@ -1,11 +1,10 @@
1
  <?php
2
-
3
  /**
4
  * Smart_Custom_Fields_Field_Boolean
5
- * Version : 1.1.0
6
  * Author : Toro_Unit, inc2734
7
  * Created : April 6, 2015
8
- * Modified : June 4, 2016
9
  * License : GPLv2 or later
10
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
  */
@@ -153,7 +152,13 @@ class Smart_Custom_Fields_Field_Boolean extends Smart_Custom_Fields_Field_Base {
153
  */
154
  public function validate_get_value( $value, $field_type ) {
155
  if ( $field_type === $this->get_attribute( 'type' ) ) {
156
- $value = !!$value;
 
 
 
 
 
 
157
  }
158
  return $value;
159
  }
1
  <?php
 
2
  /**
3
  * Smart_Custom_Fields_Field_Boolean
4
+ * Version : 1.1.1
5
  * Author : Toro_Unit, inc2734
6
  * Created : April 6, 2015
7
+ * Modified : July 28, 2016
8
  * License : GPLv2 or later
9
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  */
152
  */
153
  public function validate_get_value( $value, $field_type ) {
154
  if ( $field_type === $this->get_attribute( 'type' ) ) {
155
+ if ( is_array( $value ) ) {
156
+ foreach ( $value as $key => $val ) {
157
+ $value[$key] = !!$val;
158
+ }
159
+ } else {
160
+ $value = !!$value;
161
+ }
162
  }
163
  return $value;
164
  }
js/editor-colorpicker.js CHANGED
@@ -1,9 +1,9 @@
1
  /**
2
  * editor-colorpicker.js
3
- * Version : 1.0.0
4
  * Author : inc2734
5
  * Created : October 21, 2014
6
- * Modified :
7
  * License : GPLv2 or later
8
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  */
@@ -16,12 +16,12 @@ jQuery( function( $ ) {
16
  } );
17
  } );
18
 
19
- $( document ).on( 'smart-cf-after-add-group', function( e, button ) {
20
- var parent = $( button ).parents( '.smart-cf-meta-box-repeat-tables' );
21
  parent.find( '.smart-cf-colorpicker' ).each( function( i, e ) {
22
  if ( $( e ).attr( 'disabled' ) !== 'disabled' ) {
23
  $( e ).wpColorPicker();
24
  }
25
  } );
26
  } );
27
- } );
1
  /**
2
  * editor-colorpicker.js
3
+ * Version : 1.0.1
4
  * Author : inc2734
5
  * Created : October 21, 2014
6
+ * Modified : July 28, 2016
7
  * License : GPLv2 or later
8
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  */
16
  } );
17
  } );
18
 
19
+ $( document ).on( 'smart-cf-after-add-group', function( e, obj ) {
20
+ var parent = $( obj.button ).parents( '.smart-cf-meta-box-repeat-tables' );
21
  parent.find( '.smart-cf-colorpicker' ).each( function( i, e ) {
22
  if ( $( e ).attr( 'disabled' ) !== 'disabled' ) {
23
  $( e ).wpColorPicker();
24
  }
25
  } );
26
  } );
27
+ } );
js/editor-datepicker.js CHANGED
@@ -1,9 +1,9 @@
1
  /**
2
  * editor-datepicker.js
3
- * Version : 1.0.0
4
  * Author : inc2734
5
  * Created : January 18, 2015
6
- * Modified :
7
  * License : GPLv2 or later
8
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  */
@@ -16,12 +16,12 @@ jQuery( function( $ ) {
16
  } );
17
  } );
18
 
19
- $( document ).on( 'smart-cf-after-add-group', function( e, button ) {
20
- var parent = $( button ).parents( '.smart-cf-meta-box-repeat-tables' );
21
  parent.find( '.smart-cf-datepicker' ).each( function( i, e ) {
22
  if ( $( e ).attr( 'disabled' ) !== 'disabled' ) {
23
  $( e ).datepicker( $( e ).data( 'js' ) );
24
  }
25
  } );
26
  } );
27
- } );
1
  /**
2
  * editor-datepicker.js
3
+ * Version : 1.0.1
4
  * Author : inc2734
5
  * Created : January 18, 2015
6
+ * Modified : July 28, 2016
7
  * License : GPLv2 or later
8
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  */
16
  } );
17
  } );
18
 
19
+ $( document ).on( 'smart-cf-after-add-group', function( e, obj ) {
20
+ var parent = $( obj.button ).parents( '.smart-cf-meta-box-repeat-tables' );
21
  parent.find( '.smart-cf-datepicker' ).each( function( i, e ) {
22
  if ( $( e ).attr( 'disabled' ) !== 'disabled' ) {
23
  $( e ).datepicker( $( e ).data( 'js' ) );
24
  }
25
  } );
26
  } );
27
+ } );
js/settings-datepicker.js CHANGED
@@ -22,4 +22,4 @@ jQuery( function( $ ) {
22
  } );
23
  }
24
  } );
25
- } );
22
  } );
23
  }
24
  } );
25
+ } );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
4
  Tags: plugin, custom field, custom, field, meta, meta field, repeat, repeatable
5
  Requires at least: 3.9
6
  Tested up to: 4.5.3
7
- Stable tag: 2.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -125,6 +125,10 @@ You can send your own language pack to me.
125
 
126
  == Changelog ==
127
 
 
 
 
 
128
  = 2.2.0 =
129
  * Refactoring tests.
130
  * Changed behavior of the default value of new field of the already saved object. Using the default value.
4
  Tags: plugin, custom field, custom, field, meta, meta field, repeat, repeatable
5
  Requires at least: 3.9
6
  Tested up to: 4.5.3
7
+ Stable tag: 2.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
125
 
126
  == Changelog ==
127
 
128
+ = 2.2.1 =
129
+ * Fix bug boolean field in repeatable group #39
130
+ * Fix bug datepicker and colorpicker in repeatable group #41
131
+
132
  = 2.2.0 =
133
  * Refactoring tests.
134
  * Changed behavior of the default value of new field of the already saved object. Using the default value.
smart-custom-fields.php CHANGED
@@ -3,11 +3,11 @@
3
  * Plugin name: Smart Custom Fields
4
  * Plugin URI: https://github.com/inc2734/smart-custom-fields/
5
  * Description: Smart Custom Fields is a simple plugin that management custom fields.
6
- * Version: 2.2.0
7
  * Author: inc2734
8
  * Author URI: http://2inc.org
9
  * Created: October 9, 2014
10
- * Modified: July 2, 2016
11
  * Text Domain: smart-custom-fields
12
  * Domain Path: /languages
13
  * License: GPLv2 or later
3
  * Plugin name: Smart Custom Fields
4
  * Plugin URI: https://github.com/inc2734/smart-custom-fields/
5
  * Description: Smart Custom Fields is a simple plugin that management custom fields.
6
+ * Version: 2.2.1
7
  * Author: inc2734
8
  * Author URI: http://2inc.org
9
  * Created: October 9, 2014
10
+ * Modified: July 28, 2016
11
  * Text Domain: smart-custom-fields
12
  * Domain Path: /languages
13
  * License: GPLv2 or later