Skip to content

Commit db115b4

Browse files
author
Jerome
committed
bugfix
1 parent 75e08fc commit db115b4

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
CHANGELOG
22
---------
33

4+
##1.1.7
5+
#### Bugfix
6+
- invalid `dynamic_select` component value
7+
48
##1.1.6
59
#### Feature
610
- added `dynamic_select` component, list values from other field in post or in options

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"metabolism/acf-extensions",
3-
"version": "1.1.6",
3+
"version": "1.1.7",
44
"type": "wordpress-plugin",
55
"description": "ACF Extensions plugin with component, components, hidden field, dynamic select and latest posts field",
66
"license": "GPL-3.0-or-later"

fields/class-acf-field-dynamic_select.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ function render_field( $field ) {
2929

3030
$choice = $other_field_value[$field_key[1]]??'';
3131

32-
if( strlen($choice) )
33-
$choices[] = $other_field_value[$field_key[1]];
32+
if( strlen($choice) ){
33+
34+
$choice = $other_field_value[$field_key[1]];
35+
$choices[sanitize_title($choice)] = $choice;
36+
}
3437
}
3538
}
3639

0 commit comments

Comments
 (0)