Skip to content

Commit

Permalink
Merge pull request #6872 from pods-framework/release/2.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0ttkclark authored Aug 18, 2022
2 parents ac194bb + 8241f75 commit e2e0e23
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 18 deletions.
9 changes: 8 additions & 1 deletion classes/PodsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ public static function field( $name, $value, $type = 'text', $options = null, $p
$data = $options['data'];
}

$repeatable_field_types = self::repeatable_field_types();

// Start field render.
ob_start();

Expand Down Expand Up @@ -276,6 +278,11 @@ public static function field( $name, $value, $type = 'text', $options = null, $p
// @todo Move these custom field methods into real/faux field classes
echo call_user_func( array( get_class(), 'field_' . $type ), $name, $value, $options );
} elseif ( is_object( self::$loaded[ $type ] ) && method_exists( self::$loaded[ $type ], 'input' ) ) {
// Force non-repeatable field types to be non-repeatable even if option is set to 1.
if ( ! empty( $options['repeatable'] ) && ! in_array( $type, $repeatable_field_types, true ) ) {
$options['repeatable'] = 0;
}

self::$loaded[ $type ]->input( $name, $value, $options, $pod, $id );
} else {
/**
Expand Down Expand Up @@ -1770,7 +1777,7 @@ public static function repeatable_field_types() {
'wysiwyg',
];

$field_types = apply_filters( 'pods_repeatable_field_types', $field_types );
$field_types = (array) apply_filters( 'pods_repeatable_field_types', $field_types );
}

return $field_types;
Expand Down
9 changes: 7 additions & 2 deletions classes/fields/wysiwyg.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public function options() {
'type' => 'pick',
'data' => apply_filters(
'pods_form_ui_field_wysiwyg_editors', array(
'tinymce' => __( 'TinyMCE (WP Default)', 'pods' ),
'tinymce' => __( 'TinyMCE (WP Default, cannot be used with repeatable fields)', 'pods' ),
'quill' => __( 'Quill Editor (Limited line break functionality)', 'pods' ),
'cleditor' => __( 'CLEditor (No longer available, now using Quill Editor)', 'pods' ),
'cleditor' => __( 'CLEditor (No longer available, the fallback uses Quill Editor)', 'pods' ),
)
),
'pick_show_select_text' => 0,
Expand Down Expand Up @@ -229,6 +229,11 @@ public function input( $name, $value = null, $options = null, $pod = null, $id =
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
$form_field_type = PodsForm::$field_type;

// Force TinyMCE repeatable fields to not be repeatable because it lacks compatibility.
if ( 1 === (int) pods_v( 'repeatable', $options ) && 'tinymce' === pods_v( static::$type . '_editor', $options, 'tinymce', true ) ) {
$options['repeatable'] = 0;
}

$value = $this->normalize_value_for_input( $value, $options, "\n" );

// Normalize the line breaks for React.
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.2
* Version: 2.9.3
* 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.2' );
define( 'PODS_VERSION', '2.9.3' );

// Current database version, this is the last version the database changed.
define( 'PODS_DB_VERSION', '2.3.5' );
Expand Down
5 changes: 2 additions & 3 deletions package-lock.json

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

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.2",
"version": "2.9.3",
"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
9 changes: 8 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.2
Stable tag: 2.9.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

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

== Changelog ==

= 2.9.3 - August 18th, 2022 =

* Fixed: Resolve additional issue with WPGraphQL on some PHP configurations. #6868 (@sc0ttkclark)
* Fixed: Code field and others that do not support repeatable inputs are now forced to show non-repeatable inputs even if the setting was saved as on. #6855 (@sc0ttkclark)
* Fixed: TinyMCE WYSIWYG fields are now no longer showing as repeatable since they are not fully supported. Quill Editor remains supported for repeatable input. #6855 (@sc0ttkclark)
* Fixed: A development build has been resolved which broke the Code editor field. #6870 (@JoryHogeveen, @sc0ttkclark)

= 2.9.2 - August 16th, 2022 =

* Tweak: Improve the repeatable field UI elements so they blend in more. #6853 #6854 (@JoryHogeveen, @sc0ttkclark)
Expand Down
12 changes: 6 additions & 6 deletions src/Pods/Pod_Manager.php

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

2 changes: 1 addition & 1 deletion ui/js/dfv/pods-dfv.min.asset.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dependencies":["lodash","moment","react","react-dom","wp-api-fetch","wp-autop","wp-components","wp-compose","wp-data","wp-element","wp-hooks","wp-i18n","wp-keycodes","wp-plugins","wp-polyfill","wp-primitives","wp-url"],"version":"893a64f46ab7f11daded"}
{"dependencies":["lodash","moment","react","react-dom","wp-api-fetch","wp-autop","wp-components","wp-compose","wp-data","wp-element","wp-hooks","wp-i18n","wp-keycodes","wp-plugins","wp-polyfill","wp-primitives","wp-url"],"version":"7137861ac1c4dd6a69fa"}
2 changes: 1 addition & 1 deletion ui/js/dfv/pods-dfv.min.js

Large diffs are not rendered by default.

0 comments on commit e2e0e23

Please sign in to comment.