Version Description
- Fixed a compatibility issue with GF 2.5.5.4+ which converted default values to the term ID when displayed/stored.
- Added taxonomy name (in addition to label) to Taxonomy dropdowns. Credit: @grapplerulrich
Download this release
Release Info
Developer | claygriffiths |
Plugin | Gravity Forms + Custom Post Types |
Version | 3.1.23 |
Comparing to | |
See all releases |
Code changes from version 3.1.22 to 3.1.23
- gfcptaddon.php +2 -2
- gfcptaddon_1-5.php +2 -2
- gfcptaddonbase.php +6 -0
- readme.txt +4 -0
gfcptaddon.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Gravity Forms + Custom Post Types
|
4 |
Plugin URI: https://gravitywiz.com/
|
5 |
Description: Map your Gravity-Forms-generated posts to a custom post type and/or custom taxonomies.
|
6 |
-
Version: 3.1.
|
7 |
Author: Gravity Wiz
|
8 |
Author URI: https://gravitywiz.com/
|
9 |
License: GPL2
|
@@ -16,7 +16,7 @@ class GFCPTAddon {
|
|
16 |
|
17 |
private static $name = 'Gravity Forms + Custom Post Types';
|
18 |
private static $slug = 'GFCPTAddon';
|
19 |
-
private static $version = '3.1.
|
20 |
private static $min_gravityforms_version = '1.9.3';
|
21 |
|
22 |
//Plugin starting point. Will load appropriate files
|
3 |
Plugin Name: Gravity Forms + Custom Post Types
|
4 |
Plugin URI: https://gravitywiz.com/
|
5 |
Description: Map your Gravity-Forms-generated posts to a custom post type and/or custom taxonomies.
|
6 |
+
Version: 3.1.23
|
7 |
Author: Gravity Wiz
|
8 |
Author URI: https://gravitywiz.com/
|
9 |
License: GPL2
|
16 |
|
17 |
private static $name = 'Gravity Forms + Custom Post Types';
|
18 |
private static $slug = 'GFCPTAddon';
|
19 |
+
private static $version = '3.1.23';
|
20 |
private static $min_gravityforms_version = '1.9.3';
|
21 |
|
22 |
//Plugin starting point. Will load appropriate files
|
gfcptaddon_1-5.php
CHANGED
@@ -127,7 +127,7 @@ if ( ! class_exists( 'GFCPTAddon1_5' ) ) {
|
|
127 |
style="margin-top:10px; display:none;">
|
128 |
<option value="" style="color:#999;">Select a Taxonomy</option>
|
129 |
<?php foreach ( $this->get_taxonomies( $form_id ) as $taxonomy ) : ?>
|
130 |
-
<option value="<?php echo $taxonomy->name; ?>"><?php echo $taxonomy->label; ?></option>
|
131 |
<?php endforeach; ?>
|
132 |
</select>
|
133 |
</li>
|
@@ -169,7 +169,7 @@ if ( ! class_exists( 'GFCPTAddon1_5' ) ) {
|
|
169 |
foreach ( $this->get_taxonomies( $form_id ) as $taxonomy ) :
|
170 |
if ( $taxonomy->hierarchical === false ) :
|
171 |
?>
|
172 |
-
<option value="<?php echo $taxonomy->name; ?>"><?php echo $taxonomy->label; ?></option>
|
173 |
<?php endif; ?>
|
174 |
<?php endforeach; ?>
|
175 |
|
127 |
style="margin-top:10px; display:none;">
|
128 |
<option value="" style="color:#999;">Select a Taxonomy</option>
|
129 |
<?php foreach ( $this->get_taxonomies( $form_id ) as $taxonomy ) : ?>
|
130 |
+
<option value="<?php echo $taxonomy->name; ?>"><?php echo $taxonomy->label . ' (' . $taxonomy->name . ')'; ?></option>
|
131 |
<?php endforeach; ?>
|
132 |
</select>
|
133 |
</li>
|
169 |
foreach ( $this->get_taxonomies( $form_id ) as $taxonomy ) :
|
170 |
if ( $taxonomy->hierarchical === false ) :
|
171 |
?>
|
172 |
+
<option value="<?php echo $taxonomy->name; ?>"><?php echo $taxonomy->label . ' (' . $taxonomy->name . ')'; ?></option>
|
173 |
<?php endif; ?>
|
174 |
<?php endforeach; ?>
|
175 |
|
gfcptaddonbase.php
CHANGED
@@ -365,6 +365,12 @@ if ( ! class_exists( 'GFCPTAddonBase' ) ) {
|
|
365 |
*/
|
366 |
function setup_taxonomy_field( &$field, $taxonomy ) {
|
367 |
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
$first_choice = rgars( $field, 'choices/0/text' );
|
369 |
$field['choices'] = $this->load_taxonomy_choices( $taxonomy, $field['type'], $first_choice, $field );
|
370 |
$field->enableChoiceValue = true;
|
365 |
*/
|
366 |
function setup_taxonomy_field( &$field, $taxonomy ) {
|
367 |
|
368 |
+
// Setting up $field['choices'] on non choice based fields breaks default value selection
|
369 |
+
// after GF 2.5.5.4. See HS#25737
|
370 |
+
if ( ! rgar( $field, 'choices' ) ) {
|
371 |
+
return;
|
372 |
+
}
|
373 |
+
|
374 |
$first_choice = rgars( $field, 'choices/0/text' );
|
375 |
$field['choices'] = $this->load_taxonomy_choices( $taxonomy, $field['type'], $first_choice, $field );
|
376 |
$field->enableChoiceValue = true;
|
readme.txt
CHANGED
@@ -81,6 +81,10 @@ When populating a Drop Down field with a post type, you may wish to set the sele
|
|
81 |
|
82 |
== Changelog ==
|
83 |
|
|
|
|
|
|
|
|
|
84 |
= 3.1.22 =
|
85 |
|
86 |
* Added post name (in addition to label) to Post Type dropdowns in Form Editor. Credit: @grapplerulrich
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 3.1.23 =
|
85 |
+
* Fixed a compatibility issue with GF 2.5.5.4+ which converted default values to the term ID when displayed/stored.
|
86 |
+
* Added taxonomy name (in addition to label) to Taxonomy dropdowns. Credit: @grapplerulrich
|
87 |
+
|
88 |
= 3.1.22 =
|
89 |
|
90 |
* Added post name (in addition to label) to Post Type dropdowns in Form Editor. Credit: @grapplerulrich
|