Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerome committed Mar 3, 2021
1 parent 75e08fc commit db115b4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
CHANGELOG
---------

##1.1.7
#### Bugfix
- invalid `dynamic_select` component value

##1.1.6
#### Feature
- added `dynamic_select` component, list values from other field in post or in options
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"metabolism/acf-extensions",
"version": "1.1.6",
"version": "1.1.7",
"type": "wordpress-plugin",
"description": "ACF Extensions plugin with component, components, hidden field, dynamic select and latest posts field",
"license": "GPL-3.0-or-later"
Expand Down
7 changes: 5 additions & 2 deletions fields/class-acf-field-dynamic_select.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ function render_field( $field ) {

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

if( strlen($choice) )
$choices[] = $other_field_value[$field_key[1]];
if( strlen($choice) ){

$choice = $other_field_value[$field_key[1]];
$choices[sanitize_title($choice)] = $choice;
}
}
}

Expand Down

0 comments on commit db115b4

Please sign in to comment.