Version Description
- March 27th 2020 =
Bug Fixes
- Fixed: Double comma in custom pick display formats. #5637 (@JoryHogeveen)
- Fixed: Auto
use_currentnot working correctly outside the loop. #5636 (@JoryHogeveen) - Fixed: pods_trim() does not trim whitespaces by default. #5640 (@JoryHogeveen)
Download this release
Release Info
| Developer | sc0ttkclark |
| Plugin | |
| Version | 2.7.17.1 |
| Comparing to | |
| See all releases | |
Code changes from version 2.7.17 to 2.7.17.1
- classes/fields/pick.php +12 -4
- includes/data.php +8 -3
- includes/general.php +4 -4
- init.php +2 -2
- readme.txt +15 -1
classes/fields/pick.php
CHANGED
|
@@ -176,8 +176,9 @@ class PodsField_Pick extends PodsField {
|
|
| 176 |
'default' => 'default',
|
| 177 |
'type' => 'pick',
|
| 178 |
'data' => array(
|
| 179 |
-
'default'
|
| 180 |
-
'
|
|
|
|
| 181 |
),
|
| 182 |
'dependency' => true,
|
| 183 |
),
|
|
@@ -747,9 +748,16 @@ class PodsField_Pick extends PodsField {
|
|
| 747 |
'fields' => $fields,
|
| 748 |
);
|
| 749 |
|
| 750 |
-
|
| 751 |
-
|
|
|
|
|
|
|
|
|
|
| 752 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 753 |
if ( ! empty( $separator ) ) {
|
| 754 |
$args['separator'] = $separator;
|
| 755 |
|
| 176 |
'default' => 'default',
|
| 177 |
'type' => 'pick',
|
| 178 |
'data' => array(
|
| 179 |
+
'default' => __( 'Item 1, Item 2, and Item 3', 'pods' ),
|
| 180 |
+
'non_serial' => __( 'Item 1, Item 2 and Item 3', 'pods' ),
|
| 181 |
+
'custom' => __( 'Custom separator (without "and")', 'pods' ),
|
| 182 |
),
|
| 183 |
'dependency' => true,
|
| 184 |
),
|
| 748 |
'fields' => $fields,
|
| 749 |
);
|
| 750 |
|
| 751 |
+
$display_format = pods_v( static::$type . '_display_format_multi', $options, 'default' );
|
| 752 |
+
|
| 753 |
+
if ( 'non_serial' === $display_format ) {
|
| 754 |
+
$args['serial'] = false;
|
| 755 |
+
}
|
| 756 |
|
| 757 |
+
if ( 'custom' === $display_format ) {
|
| 758 |
+
$args['serial'] = false;
|
| 759 |
+
|
| 760 |
+
$separator = pods_v( static::$type . '_display_format_separator', $options, ', ' );
|
| 761 |
if ( ! empty( $separator ) ) {
|
| 762 |
$args['separator'] = $separator;
|
| 763 |
|
includes/data.php
CHANGED
|
@@ -292,13 +292,18 @@ function pods_trim( $input, $charlist = null, $lr = null ) {
|
|
| 292 |
$output[ pods_sanitize( $key ) ] = pods_trim( $val, $charlist, $lr );
|
| 293 |
}
|
| 294 |
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 295 |
if ( 'l' === $lr ) {
|
| 296 |
-
$
|
| 297 |
} elseif ( 'r' === $lr ) {
|
| 298 |
-
$
|
| 299 |
} else {
|
| 300 |
-
$
|
| 301 |
}
|
|
|
|
| 302 |
}//end if
|
| 303 |
|
| 304 |
return $output;
|
| 292 |
$output[ pods_sanitize( $key ) ] = pods_trim( $val, $charlist, $lr );
|
| 293 |
}
|
| 294 |
} else {
|
| 295 |
+
$args = array( $input );
|
| 296 |
+
if ( null !== $charlist ) {
|
| 297 |
+
$args[] = $charlist;
|
| 298 |
+
}
|
| 299 |
if ( 'l' === $lr ) {
|
| 300 |
+
$function = 'ltrim';
|
| 301 |
} elseif ( 'r' === $lr ) {
|
| 302 |
+
$function = 'rtrim';
|
| 303 |
} else {
|
| 304 |
+
$function = 'trim';
|
| 305 |
}
|
| 306 |
+
$output = call_user_func_array( $function, $args );
|
| 307 |
}//end if
|
| 308 |
|
| 309 |
return $output;
|
includes/general.php
CHANGED
|
@@ -894,8 +894,8 @@ function pods_shortcode_run( $tags, $content = null ) {
|
|
| 894 |
}
|
| 895 |
}
|
| 896 |
|
| 897 |
-
if ( empty( $tags['name'] ) ) {
|
| 898 |
-
return '<p>Please provide a Pod name</p>';
|
| 899 |
}
|
| 900 |
}
|
| 901 |
|
|
@@ -912,7 +912,7 @@ function pods_shortcode_run( $tags, $content = null ) {
|
|
| 912 |
}
|
| 913 |
|
| 914 |
if ( empty( $content ) && empty( $tags['pods_page'] ) && empty( $tags['template'] ) && empty( $tags['field'] ) && empty( $tags['form'] ) ) {
|
| 915 |
-
return '<p>Please provide either a template or field name</p>';
|
| 916 |
}
|
| 917 |
|
| 918 |
if ( ! $tags['use_current'] && ! isset( $id ) ) {
|
|
@@ -950,7 +950,7 @@ function pods_shortcode_run( $tags, $content = null ) {
|
|
| 950 |
}
|
| 951 |
|
| 952 |
if ( empty( $pod ) || ! $pod->valid() ) {
|
| 953 |
-
return '<p>Pod not found</p>';
|
| 954 |
}
|
| 955 |
|
| 956 |
$found = 0;
|
| 894 |
}
|
| 895 |
}
|
| 896 |
|
| 897 |
+
if ( ! $tags['use_current'] && empty( $tags['name'] ) ) {
|
| 898 |
+
return '<p>' . __( 'Please provide a Pod name', 'pods' ) . '</p>';
|
| 899 |
}
|
| 900 |
}
|
| 901 |
|
| 912 |
}
|
| 913 |
|
| 914 |
if ( empty( $content ) && empty( $tags['pods_page'] ) && empty( $tags['template'] ) && empty( $tags['field'] ) && empty( $tags['form'] ) ) {
|
| 915 |
+
return '<p>' . __( 'Please provide either a template or field name', 'pods' ) . '</p>';
|
| 916 |
}
|
| 917 |
|
| 918 |
if ( ! $tags['use_current'] && ! isset( $id ) ) {
|
| 950 |
}
|
| 951 |
|
| 952 |
if ( empty( $pod ) || ! $pod->valid() ) {
|
| 953 |
+
return '<p>' . __( 'Pod not found', 'pods' ) . '</p>';
|
| 954 |
}
|
| 955 |
|
| 956 |
$found = 0;
|
init.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: Pods - Custom Content Types and Fields
|
| 4 |
Plugin URI: https://pods.io/
|
| 5 |
Description: Pods is a framework for creating, managing, and deploying customized content types and fields
|
| 6 |
-
Version: 2.7.17
|
| 7 |
Author: Pods Framework Team
|
| 8 |
Author URI: https://pods.io/about/
|
| 9 |
Text Domain: pods
|
|
@@ -36,7 +36,7 @@ if ( defined( 'PODS_VERSION' ) || defined( 'PODS_DIR' ) ) {
|
|
| 36 |
add_action( 'init', 'pods_deactivate_pods_ui' );
|
| 37 |
} else {
|
| 38 |
// Current version
|
| 39 |
-
define( 'PODS_VERSION', '2.7.17' );
|
| 40 |
|
| 41 |
// Version tracking between DB updates themselves
|
| 42 |
define( 'PODS_DB_VERSION', '2.3.5' );
|
| 3 |
Plugin Name: Pods - Custom Content Types and Fields
|
| 4 |
Plugin URI: https://pods.io/
|
| 5 |
Description: Pods is a framework for creating, managing, and deploying customized content types and fields
|
| 6 |
+
Version: 2.7.17.1
|
| 7 |
Author: Pods Framework Team
|
| 8 |
Author URI: https://pods.io/about/
|
| 9 |
Text Domain: pods
|
| 36 |
add_action( 'init', 'pods_deactivate_pods_ui' );
|
| 37 |
} else {
|
| 38 |
// Current version
|
| 39 |
+
define( 'PODS_VERSION', '2.7.17.1' );
|
| 40 |
|
| 41 |
// Version tracking between DB updates themselves
|
| 42 |
define( 'PODS_DB_VERSION', '2.3.5' );
|
readme.txt
CHANGED
|
@@ -5,7 +5,7 @@ Tags: pods, custom post types, custom taxonomies, content types, custom fields,
|
|
| 5 |
Requires at least: 4.5
|
| 6 |
Tested up to: 5.4
|
| 7 |
Requires PHP: 5.3
|
| 8 |
-
Stable tag: 2.7.17
|
| 9 |
License: GPLv2 or later
|
| 10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
|
|
@@ -190,9 +190,18 @@ We are also available through our [Live Slack Chat](https://pods.io/chat/) to he
|
|
| 190 |
|
| 191 |
== Changelog ==
|
| 192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
= 2.7.17 - March 26th 2020 =
|
| 194 |
|
| 195 |
**New Features & Enhancements**
|
|
|
|
| 196 |
* Added: New callout for our Friends of Pods program will show up on the Pods Admin > Pods list so we can let people know how to donate. #5571 (@nicdford, @sc0ttkclark, @JoryHogeveen)
|
| 197 |
* Added: Freemius integration to support our new Friends of Pods add-ons and enable us to let people opt-in to usage stats for planning future compatibility decisions. #5624 (@sc0ttkclark)
|
| 198 |
* Added: New `not_found` tag to the Pods shortcode to return default string if no output is empty. #5580 (@JoryHogeveen)
|
|
@@ -208,6 +217,7 @@ We are also available through our [Live Slack Chat](https://pods.io/chat/) to he
|
|
| 208 |
* Docs: Update inline docs for pick field selected logic. #5014 & #5017 (@sc0ttkclark)
|
| 209 |
|
| 210 |
**Bug Fixes**
|
|
|
|
| 211 |
* Fixed: Date/Time - Correct empty value validation. #5534 & #5544 (@JoryHogeveen)
|
| 212 |
* Fixed: Date/Time - Allow midnight (00:00:00) as time value. #5616 (@JoryHogeveen)
|
| 213 |
* Fixed: Number/Currency - Parsing error for number format 9'999.99. #5559 & #5597 (@JoryHogeveen)
|
|
@@ -234,12 +244,14 @@ We are also available through our [Live Slack Chat](https://pods.io/chat/) to he
|
|
| 234 |
= 2.7.16 - November 13th 2019 =
|
| 235 |
|
| 236 |
**Enhancements**
|
|
|
|
| 237 |
* Enhancement: CSS fixes for WP 5.3. #5501 (@JoryHogeveen)
|
| 238 |
* Enhancement: Format traversed fields properly. #4932 (@jamesgol)
|
| 239 |
* Enhancement: ACT list view pagination. #5510 (@JoryHogeveen)
|
| 240 |
* Enhancement: Add PODS_SHORTCODE_ALLOW_EVALUATE_TAGS to debug info. #5310 (@JoryHogeveen)
|
| 241 |
|
| 242 |
**Bug Fixes**
|
|
|
|
| 243 |
* Fixed: Avoid SQL errors when using special magic tags. #5310 (@sc0ttkclark)
|
| 244 |
* Fixed: Validate shortcode query tags before default to current object. #5520 (@JoryHogeveen)
|
| 245 |
* Fixed: Unslash simple relationship values to support saving quoted values. #5517 (@JoryHogeveen)
|
|
@@ -262,12 +274,14 @@ We are also available through our [Live Slack Chat](https://pods.io/chat/) to he
|
|
| 262 |
= 2.7.15 - September 5th 2019 =
|
| 263 |
|
| 264 |
**Enhancements**
|
|
|
|
| 265 |
* Enhancement: Add year range option to date & datetime fields. #5442 (@JoryHogeveen)
|
| 266 |
* Enhancement: Support single select relationships in templates when using `[each]`. #4507 (@sc0ttkclark, @JoryHogeveen)
|
| 267 |
* Enhancement: Prevent creation of Pods using reserved keywords from WordPress Codex and Pods. #5428 (@JoryHogeveen)
|
| 268 |
* Enhancement: Allow all callables to be passed in magic tags. #5436 (@JoryHogeveen)
|
| 269 |
|
| 270 |
**Bug Fixes**
|
|
|
|
| 271 |
* Fixed: Always convert database value for date/time fields without timezone to maintain the actual value. #5423 & #5424 (@JoryHogeveen)
|
| 272 |
* Fixed: Solve issues with saving date/time fields in other locales. #5444, #5421, #5415 & #5451 (@JoryHogeveen)
|
| 273 |
* Fixed: Import from file with absolute path. #5430 (@mistraloz)
|
| 5 |
Requires at least: 4.5
|
| 6 |
Tested up to: 5.4
|
| 7 |
Requires PHP: 5.3
|
| 8 |
+
Stable tag: 2.7.17.1
|
| 9 |
License: GPLv2 or later
|
| 10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
|
| 190 |
|
| 191 |
== Changelog ==
|
| 192 |
|
| 193 |
+
= 2.7.17.1 - March 27th 2020 =
|
| 194 |
+
|
| 195 |
+
**Bug Fixes**
|
| 196 |
+
|
| 197 |
+
* Fixed: Double comma in custom pick display formats. #5637 (@JoryHogeveen)
|
| 198 |
+
* Fixed: Auto `use_current` not working correctly outside the loop. #5636 (@JoryHogeveen)
|
| 199 |
+
* Fixed: pods_trim() does not trim whitespaces by default. #5640 (@JoryHogeveen)
|
| 200 |
+
|
| 201 |
= 2.7.17 - March 26th 2020 =
|
| 202 |
|
| 203 |
**New Features & Enhancements**
|
| 204 |
+
|
| 205 |
* Added: New callout for our Friends of Pods program will show up on the Pods Admin > Pods list so we can let people know how to donate. #5571 (@nicdford, @sc0ttkclark, @JoryHogeveen)
|
| 206 |
* Added: Freemius integration to support our new Friends of Pods add-ons and enable us to let people opt-in to usage stats for planning future compatibility decisions. #5624 (@sc0ttkclark)
|
| 207 |
* Added: New `not_found` tag to the Pods shortcode to return default string if no output is empty. #5580 (@JoryHogeveen)
|
| 217 |
* Docs: Update inline docs for pick field selected logic. #5014 & #5017 (@sc0ttkclark)
|
| 218 |
|
| 219 |
**Bug Fixes**
|
| 220 |
+
|
| 221 |
* Fixed: Date/Time - Correct empty value validation. #5534 & #5544 (@JoryHogeveen)
|
| 222 |
* Fixed: Date/Time - Allow midnight (00:00:00) as time value. #5616 (@JoryHogeveen)
|
| 223 |
* Fixed: Number/Currency - Parsing error for number format 9'999.99. #5559 & #5597 (@JoryHogeveen)
|
| 244 |
= 2.7.16 - November 13th 2019 =
|
| 245 |
|
| 246 |
**Enhancements**
|
| 247 |
+
|
| 248 |
* Enhancement: CSS fixes for WP 5.3. #5501 (@JoryHogeveen)
|
| 249 |
* Enhancement: Format traversed fields properly. #4932 (@jamesgol)
|
| 250 |
* Enhancement: ACT list view pagination. #5510 (@JoryHogeveen)
|
| 251 |
* Enhancement: Add PODS_SHORTCODE_ALLOW_EVALUATE_TAGS to debug info. #5310 (@JoryHogeveen)
|
| 252 |
|
| 253 |
**Bug Fixes**
|
| 254 |
+
|
| 255 |
* Fixed: Avoid SQL errors when using special magic tags. #5310 (@sc0ttkclark)
|
| 256 |
* Fixed: Validate shortcode query tags before default to current object. #5520 (@JoryHogeveen)
|
| 257 |
* Fixed: Unslash simple relationship values to support saving quoted values. #5517 (@JoryHogeveen)
|
| 274 |
= 2.7.15 - September 5th 2019 =
|
| 275 |
|
| 276 |
**Enhancements**
|
| 277 |
+
|
| 278 |
* Enhancement: Add year range option to date & datetime fields. #5442 (@JoryHogeveen)
|
| 279 |
* Enhancement: Support single select relationships in templates when using `[each]`. #4507 (@sc0ttkclark, @JoryHogeveen)
|
| 280 |
* Enhancement: Prevent creation of Pods using reserved keywords from WordPress Codex and Pods. #5428 (@JoryHogeveen)
|
| 281 |
* Enhancement: Allow all callables to be passed in magic tags. #5436 (@JoryHogeveen)
|
| 282 |
|
| 283 |
**Bug Fixes**
|
| 284 |
+
|
| 285 |
* Fixed: Always convert database value for date/time fields without timezone to maintain the actual value. #5423 & #5424 (@JoryHogeveen)
|
| 286 |
* Fixed: Solve issues with saving date/time fields in other locales. #5444, #5421, #5415 & #5451 (@JoryHogeveen)
|
| 287 |
* Fixed: Import from file with absolute path. #5430 (@mistraloz)
|
