Pods – Custom Content Types and Fields - Version 2.8.10

Version Description

  • February 1st, 2022 =

  • Fixed: Meta compatibility fix for when it was not saving to meta through direct update meta calls. #6429 #6431 (@sc0ttkclark)

  • Fixed: Don't render the wrapper HTML for blocks if the contents are empty. (@sc0ttkclark)

Download this release

Release Info

Developer sc0ttkclark
Plugin Icon 128x128 Pods – Custom Content Types and Fields
Version 2.8.10
Comparing to
See all releases

Code changes from version 2.8.9 to 2.8.10

classes/PodsAPI.php CHANGED
@@ -5067,15 +5067,13 @@ class PodsAPI {
5067
  $table_formats[] = PodsForm::prepare( $type, $options );
5068
  }
5069
 
5070
- if ( ! $params->podsmeta_direct ) {
5071
- // Check if the field is not a simple relationship OR the simple relationship field is allowed to be saved to meta.
5072
- if ( ! $simple ) {
5073
- // Save fields to meta.
5074
- $object_meta[ $field ] = $value;
5075
- } elseif ( $save_simple_to_meta ) {
5076
- // Save simple to meta.
5077
- $simple_rel_meta[ $field ] = $value;
5078
- }
5079
  }
5080
  } else {
5081
  // Store relational field data to be looped through later
@@ -5660,6 +5658,12 @@ class PodsAPI {
5660
  $related_ids = array_slice( $related_ids, 0, $related_limit );
5661
  }
5662
 
 
 
 
 
 
 
5663
  // Post Types, Media, Users, and Comments (meta-based)
5664
  if ( pods_relationship_meta_storage_enabled( $field, $pod ) && in_array( $pod['type'], [
5665
  'post_type',
@@ -5779,6 +5783,10 @@ class PodsAPI {
5779
  */
5780
  do_action( 'pods_api_save_relationships', $id, $related_ids, $field, $pod );
5781
 
 
 
 
 
5782
  return $related_ids;
5783
  }
5784
 
5067
  $table_formats[] = PodsForm::prepare( $type, $options );
5068
  }
5069
 
5070
+ // Check if the field is not a simple relationship OR the simple relationship field is allowed to be saved to meta.
5071
+ if ( ! $simple ) {
5072
+ // Save fields to meta.
5073
+ $object_meta[ $field ] = $value;
5074
+ } elseif ( $save_simple_to_meta ) {
5075
+ // Save simple to meta.
5076
+ $simple_rel_meta[ $field ] = $value;
 
 
5077
  }
5078
  } else {
5079
  // Store relational field data to be looped through later
5658
  $related_ids = array_slice( $related_ids, 0, $related_limit );
5659
  }
5660
 
5661
+ $no_conflict = pods_no_conflict_check( $pod['type'] );
5662
+
5663
+ if ( ! $no_conflict ) {
5664
+ pods_no_conflict_on( $pod['type'] );
5665
+ }
5666
+
5667
  // Post Types, Media, Users, and Comments (meta-based)
5668
  if ( pods_relationship_meta_storage_enabled( $field, $pod ) && in_array( $pod['type'], [
5669
  'post_type',
5783
  */
5784
  do_action( 'pods_api_save_relationships', $id, $related_ids, $field, $pod );
5785
 
5786
+ if ( ! $no_conflict ) {
5787
+ pods_no_conflict_off( $pod['type'] );
5788
+ }
5789
+
5790
  return $related_ids;
5791
  }
5792
 
includes/general.php CHANGED
@@ -986,13 +986,13 @@ function pods_shortcode( $tags, $content = null ) {
986
  *
987
  * @since 2.8.9
988
  *
989
- * @param string $html The HTML to wrap.
990
- * @param array $attributes List of attributes for the element.
991
  *
992
  * @return string The wrapped HTML.
993
  */
994
  function pods_wrap_html( $html, $attributes = [] ) {
995
- if ( empty( $attributes ) ) {
996
  return $html;
997
  }
998
 
@@ -1128,15 +1128,15 @@ function pods_shortcode_run( $tags, $content = null ) {
1128
  if ( 0 < strlen( $tags['view'] ) ) {
1129
  $return = '';
1130
 
1131
- if ( ! file_exists( $tags['view'] ) ) {
1132
  $return = pods_view( $tags['view'], null, (int) $tags['expires'], $tags['cache_mode'], true );
1133
 
1134
  if ( $tags['shortcodes'] && defined( 'PODS_SHORTCODE_ALLOW_SUB_SHORTCODES' ) && PODS_SHORTCODE_ALLOW_SUB_SHORTCODES ) {
1135
  $return = do_shortcode( $return );
1136
  }
1137
- }
1138
 
1139
- $return = pods_wrap_html( $return, $tags );
 
1140
 
1141
  /**
1142
  * Allow customization of shortcode output based on shortcode attributes.
986
  *
987
  * @since 2.8.9
988
  *
989
+ * @param string $html The HTML to wrap.
990
+ * @param array $attributes List of attributes for the element.
991
  *
992
  * @return string The wrapped HTML.
993
  */
994
  function pods_wrap_html( $html, $attributes = [] ) {
995
+ if ( empty( $attributes ) || '' === trim( $html ) ) {
996
  return $html;
997
  }
998
 
1128
  if ( 0 < strlen( $tags['view'] ) ) {
1129
  $return = '';
1130
 
1131
+ if ( ( ! defined( 'PODS_SHORTCODE_ALLOW_VIEWS' ) || PODS_SHORTCODE_ALLOW_VIEWS ) && ! file_exists( $tags['view'] ) ) {
1132
  $return = pods_view( $tags['view'], null, (int) $tags['expires'], $tags['cache_mode'], true );
1133
 
1134
  if ( $tags['shortcodes'] && defined( 'PODS_SHORTCODE_ALLOW_SUB_SHORTCODES' ) && PODS_SHORTCODE_ALLOW_SUB_SHORTCODES ) {
1135
  $return = do_shortcode( $return );
1136
  }
 
1137
 
1138
+ $return = pods_wrap_html( $return, $tags );
1139
+ }
1140
 
1141
  /**
1142
  * Allow customization of shortcode output based on shortcode attributes.
init.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: Pods - Custom Content Types and Fields
11
  * Plugin URI: https://pods.io/
12
  * Description: Pods is a framework for creating, managing, and deploying customized content types and fields
13
- * Version: 2.8.9
14
  * Author: Pods Framework Team
15
  * Author URI: https://pods.io/about/
16
  * Text Domain: pods
@@ -43,7 +43,7 @@ if ( defined( 'PODS_VERSION' ) || defined( 'PODS_DIR' ) ) {
43
  add_action( 'init', 'pods_deactivate_pods_ui' );
44
  } else {
45
  // Current version.
46
- define( 'PODS_VERSION', '2.8.9' );
47
 
48
  // Current database version, this is the last version the database changed.
49
  define( 'PODS_DB_VERSION', '2.3.5' );
10
  * Plugin Name: Pods - Custom Content Types and Fields
11
  * Plugin URI: https://pods.io/
12
  * Description: Pods is a framework for creating, managing, and deploying customized content types and fields
13
+ * Version: 2.8.10
14
  * Author: Pods Framework Team
15
  * Author URI: https://pods.io/about/
16
  * Text Domain: pods
43
  add_action( 'init', 'pods_deactivate_pods_ui' );
44
  } else {
45
  // Current version.
46
+ define( 'PODS_VERSION', '2.8.10' );
47
 
48
  // Current database version, this is the last version the database changed.
49
  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: 5.5
6
  Tested up to: 5.9
7
  Requires PHP: 5.6
8
- Stable tag: 2.8.9
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -151,6 +151,11 @@ Pods really wouldn't be where it is without all the contributions from our [dono
151
 
152
  == Changelog ==
153
 
 
 
 
 
 
154
  = 2.8.9 - January 31st, 2022 =
155
 
156
  * Added: There's a new tool at Pods Admin > Settings > Tools that will let you "Recreate missing tables". This will run the logic used to create those tables needed by Pods. This is currently just for `wp_podsrel` but will eventually include all other table-based Pods too. #5795 (@sc0ttkclark)
5
  Requires at least: 5.5
6
  Tested up to: 5.9
7
  Requires PHP: 5.6
8
+ Stable tag: 2.8.10
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
151
 
152
  == Changelog ==
153
 
154
+ = 2.8.10 - February 1st, 2022 =
155
+
156
+ * Fixed: Meta compatibility fix for when it was not saving to meta through direct update meta calls. #6429 #6431 (@sc0ttkclark)
157
+ * Fixed: Don't render the wrapper HTML for blocks if the contents are empty. (@sc0ttkclark)
158
+
159
  = 2.8.9 - January 31st, 2022 =
160
 
161
  * Added: There's a new tool at Pods Admin > Settings > Tools that will let you "Recreate missing tables". This will run the logic used to create those tables needed by Pods. This is currently just for `wp_podsrel` but will eventually include all other table-based Pods too. #5795 (@sc0ttkclark)
src/Pods/Admin/Settings.php CHANGED
@@ -194,7 +194,7 @@ class Settings {
194
  $fields['wisdom_opt_out'] = [
195
  'name' => 'wisdom_opt_out',
196
  'label' => __( 'Would you like to opt-out of tracking?', 'pods' ),
197
- 'description' => __( 'Thank you for installing our plugin. We\'d like your permission to track its usage on your site. We won\'t record any sensitive data, only information regarding the WordPress environment, your site admin email address, and plugin settings. We will only use this information help us make improvements to the plugin and provide better support when you reach out. Tracking is completely optional.', 'pods' ),
198
  'type' => 'pick',
199
  'default' => $is_wisdom_opted_out ? '1' : '',
200
  'pick_format' => 'single',
194
  $fields['wisdom_opt_out'] = [
195
  'name' => 'wisdom_opt_out',
196
  'label' => __( 'Would you like to opt-out of tracking?', 'pods' ),
197
+ 'description' => __( 'Thank you for installing our plugin. We\'d like your permission to track its usage on your site. We won\'t record any sensitive data, only information regarding the WordPress environment and your plugin settings. We will only use this information help us make improvements to the plugin and provide better support when you reach out. Tracking is completely optional.', 'pods' ),
198
  'type' => 'pick',
199
  'default' => $is_wisdom_opted_out ? '1' : '',
200
  'pick_format' => 'single',