Skip to content

Commit

Permalink
Merge pull request #6866 from pods-framework/release/2.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0ttkclark authored Aug 16, 2022
2 parents e605841 + 7492079 commit ac194bb
Show file tree
Hide file tree
Showing 19 changed files with 5,121 additions and 170 deletions.
5 changes: 3 additions & 2 deletions classes/PodsAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -5452,7 +5452,8 @@ public function save_pod_item( $params ) {
$post_terms = (array) $post_terms;

foreach ( $post_terms as $k => $v ) {
if ( ! preg_match( '/[^0-9]/', $v ) ) {
// Enforce integers for numeric strings or else fallback to slugs.
if ( is_numeric( $v ) ) {
$v = (int) $v;
}

Expand Down Expand Up @@ -5731,7 +5732,7 @@ public function prepare_tableless_data_for_save( $pod, $field, $values, $pieces
// @todo Handle simple relationships eventually
foreach ( $values as $v ) {
if ( ! is_array( $v ) ) {
if ( ! preg_match( '/[^\D]/', $v ) ) {
if ( is_numeric( $v ) ) {
$v = (int) $v;
} elseif ( $is_file_field ) {
// File handling
Expand Down
21 changes: 19 additions & 2 deletions classes/PodsInit.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ public function __construct() {

// Setup common info for after TEC/ET load.
add_action( 'plugins_loaded', [ $this, 'maybe_set_common_lib_info' ], 1 );
add_action( 'tribe_common_loaded', [ $this, 'run' ], 0 );
add_action( 'plugins_loaded', [ $this, 'maybe_load_common' ], 11 );
add_action( 'tribe_common_loaded', [ $this, 'run' ], 11 );
}

/**
Expand Down Expand Up @@ -291,6 +292,23 @@ public function maybe_set_common_lib_info() {
}
}

/**
* If common was registered but not ultimately loaded, register ours and load it.
*
* @since 2.9.2
*/
public function maybe_load_common() {
// Don't load if Common is already loaded or if Common info was never registered.
if ( empty( $GLOBALS['tribe-common-info'] ) || did_action( 'tribe_common_loaded' ) ) {
return;
}

// Reset common info so we can register ours.
$GLOBALS['tribe-common-info'] = null;

$this->maybe_set_common_lib_info();
}

/**
* Display a missing-tribe-common library error.
*
Expand Down Expand Up @@ -2532,7 +2550,6 @@ public function reset( $_blog_id = null ) {
}

public function run() {

static $ran;

if ( ! empty( $ran ) ) {
Expand Down
1 change: 1 addition & 0 deletions classes/fields/datetime.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ public function validate( $value, $name = null, $options = null, $fields = null,
if ( ! $this->is_empty( $value ) ) {

// Value should always be passed as storage format since 2.7.15.
// This was broken since 2.8.x and restored in 2.9.2 (#6389).
$formats = [
static::$storage_format,
];
Expand Down
3 changes: 3 additions & 0 deletions classes/fields/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ public function options() {
'label' => __( 'Gallery Image Links', 'pods' ),
'depends-on' => array( static::$type . '_wp_gallery_output' => true ),
'type' => 'pick',
'default' => 'file',
'data' => array(
'post' => __( 'Attachment Page', 'pods' ),
'file' => __( 'Media File', 'pods' ),
Expand All @@ -276,6 +277,7 @@ public function options() {
'label' => __( 'Gallery Image Columns', 'pods' ),
'depends-on' => array( static::$type . '_wp_gallery_output' => true ),
'type' => 'pick',
'default' => '3',
'data' => array(
'1' => '1',
'2' => '2',
Expand All @@ -298,6 +300,7 @@ public function options() {
'label' => __( 'Gallery Image Size', 'pods' ),
'depends-on' => array( static::$type . '_wp_gallery_output' => true ),
'type' => 'pick',
'default' => 'thumbnail',
'data' => $this->data_image_sizes(),
'pick_show_select_text' => 0,
),
Expand Down
4 changes: 2 additions & 2 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: Pods - Custom Content Types and Fields
* Plugin URI: https://pods.io/
* Description: Pods is a framework for creating, managing, and deploying customized content types and fields
* Version: 2.9.1
* Version: 2.9.2
* Author: Pods Framework Team
* Author URI: https://pods.io/about/
* Text Domain: pods
Expand Down Expand Up @@ -43,7 +43,7 @@
add_action( 'init', 'pods_deactivate_pods_ui' );
} else {
// Current version.
define( 'PODS_VERSION', '2.9.1' );
define( 'PODS_VERSION', '2.9.2' );

// Current database version, this is the last version the database changed.
define( 'PODS_DB_VERSION', '2.3.5' );
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pods",
"version": "2.9.1",
"version": "2.9.2",
"description": "Pods is a development framework for creating, extending, managing, and deploying customized content types in WordPress.",
"author": "Pods Foundation, Inc",
"homepage": "https://pods.io/",
Expand Down
13 changes: 12 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: pods, custom post types, custom taxonomies, content types, custom fields,
Requires at least: 5.7
Tested up to: 6.1
Requires PHP: 5.6
Stable tag: 2.9.1
Stable tag: 2.9.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -165,6 +165,17 @@ Pods really wouldn't be where it is without all the contributions from our [dono

== Changelog ==

= 2.9.2 - August 16th, 2022 =

* Tweak: Improve the repeatable field UI elements so they blend in more. #6853 #6854 (@JoryHogeveen, @sc0ttkclark)
* Tweak: Use a popover UI for color fields. #6858 #6859 (@JoryHogeveen)
* Tweak: Use a popover UI for date, date/time, and time fields. #6857 #6389 #6860 (@JoryHogeveen)
* Fixed: Resolve conflicts with Restrict Content Pro to deal with how it uses the shared Common library. (@sc0ttkclark)
* Fixed: Resolve issues with taggable relationships not saving string values. #6862 #6863 (@JoryHogeveen, @sc0ttkclark)
* Fixed: Resolve formatting issues with saved date/time field variations on save. #6389 #6860 (@JoryHogeveen)
* Fixed: Resolve error with WPGraphQL on some PHP configurations. #6865 (@sc0ttkclark)
* Fixed: Resolve error in the field settings for Files with Gallery enabled. #6864 (@sc0ttkclark)

= 2.9.1 - August 10th, 2022 =

* Fixed: CodeMirror compatibility updated after some packages in the build caused Code fields to not show in the Pods forms. #6580 #6584 (@zrothauser, @sc0ttkclark)
Expand Down
2 changes: 1 addition & 1 deletion src/Pods/Admin/Config/Field.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 0 additions & 66 deletions src/Pods/Pod_Manager.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ac194bb

Please sign in to comment.