Smart Custom Fields - Version 3.1.3

Version Description

  • Fix Selectable number bug
Download this release

Release Info

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

Code changes from version 3.1.2 to 3.1.3

classes/fields/class.field-related-posts.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
  /**
3
  * Smart_Custom_Fields_Field_Related_Posts
4
- * Version : 1.4.0
5
  * Author : inc2734
6
  * Created : October 7, 2014
7
- * Modified : January 27, 2017
8
  * License : GPLv2 or later
9
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  */
@@ -126,7 +126,7 @@ class Smart_Custom_Fields_Field_Related_Posts extends Smart_Custom_Fields_Field_
126
  if ( ! $post_type ) {
127
  $post_type = array( 'post' );
128
  }
129
- if ( ! is_int( $limit ) ) {
130
  $limit = '';
131
  }
132
  $posts_per_page = get_option( 'posts_per_page' );
@@ -247,7 +247,7 @@ class Smart_Custom_Fields_Field_Related_Posts extends Smart_Custom_Fields_Field_
247
  <td>
248
  <input type="number"
249
  name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'limit' ) ); ?>"
250
- value="<?php echo esc_attr( $this->get( 'number' ) ); ?>" min="1" step="1" />
251
  </td>
252
  </tr>
253
  <tr>
1
  <?php
2
  /**
3
  * Smart_Custom_Fields_Field_Related_Posts
4
+ * Version : 1.4.1
5
  * Author : inc2734
6
  * Created : October 7, 2014
7
+ * Modified : February 20, 2017
8
  * License : GPLv2 or later
9
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  */
126
  if ( ! $post_type ) {
127
  $post_type = array( 'post' );
128
  }
129
+ if ( ! preg_match( '/^\d+$/', $limit ) ) {
130
  $limit = '';
131
  }
132
  $posts_per_page = get_option( 'posts_per_page' );
247
  <td>
248
  <input type="number"
249
  name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'limit' ) ); ?>"
250
+ value="<?php echo esc_attr( $this->get( 'limit' ) ); ?>" min="1" step="1" />
251
  </td>
252
  </tr>
253
  <tr>
classes/fields/class.field-related-terms.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
  /**
3
  * Smart_Custom_Fields_Field_Related_Terms
4
- * Version : 1.5.0
5
  * Author : inc2734
6
  * Created : October 7, 2014
7
- * Modified : January 27, 2017
8
  * License : GPLv2 or later
9
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  */
@@ -127,7 +127,7 @@ class Smart_Custom_Fields_Field_Related_Terms extends Smart_Custom_Fields_Field_
127
  if ( ! $taxonomies ) {
128
  $taxonomies = array( 'category' );
129
  }
130
- if ( ! is_int( $limit ) ) {
131
  $limit = '';
132
  }
133
  $number = get_option( 'posts_per_page' );
@@ -248,7 +248,7 @@ class Smart_Custom_Fields_Field_Related_Terms extends Smart_Custom_Fields_Field_
248
  <td>
249
  <input type="number"
250
  name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'limit' ) ); ?>"
251
- value="<?php echo esc_attr( $this->get( 'number' ) ); ?>" min="1" step="1" />
252
  </td>
253
  </tr>
254
  <tr>
1
  <?php
2
  /**
3
  * Smart_Custom_Fields_Field_Related_Terms
4
+ * Version : 1.5.1
5
  * Author : inc2734
6
  * Created : October 7, 2014
7
+ * Modified : February 20, 2017
8
  * License : GPLv2 or later
9
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  */
127
  if ( ! $taxonomies ) {
128
  $taxonomies = array( 'category' );
129
  }
130
+ if ( ! preg_match( '/^\d+$/', $limit ) ) {
131
  $limit = '';
132
  }
133
  $number = get_option( 'posts_per_page' );
248
  <td>
249
  <input type="number"
250
  name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'limit' ) ); ?>"
251
+ value="<?php echo esc_attr( $this->get( 'limit' ) ); ?>" min="1" step="1" />
252
  </td>
253
  </tr>
254
  <tr>
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.7.1
7
- Stable tag: 3.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -127,6 +127,9 @@ You can translate this plugin into your language by using [GlotPress](https://tr
127
 
128
  == Changelog ==
129
 
 
 
 
130
  = 3.1.2 =
131
  * Update readme.txt
132
 
4
  Tags: plugin, custom field, custom, field, meta, meta field, repeat, repeatable
5
  Requires at least: 3.9
6
  Tested up to: 4.7.1
7
+ Stable tag: 3.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
127
 
128
  == Changelog ==
129
 
130
+ = 3.1.3 =
131
+ * Fix Selectable number bug
132
+
133
  = 3.1.2 =
134
  * Update readme.txt
135
 
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: 3.1.2
7
  * Author: inc2734
8
  * Author URI: http://2inc.org
9
  * Created: October 9, 2014
10
- * Modified: February 2, 2017
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: 3.1.3
7
  * Author: inc2734
8
  * Author URI: http://2inc.org
9
  * Created: October 9, 2014
10
+ * Modified: February 20, 2017
11
  * Text Domain: smart-custom-fields
12
  * Domain Path: /languages
13
  * License: GPLv2 or later