Fix retrieval of options from callback function

This commit is contained in:
Champ Camba
2019-07-25 01:52:38 +08:00
parent 90db7d422c
commit 9a2df1fee3
+1
View File
@@ -95,6 +95,7 @@ if ( ! class_exists( 'um\core\Validation' ) ) {
! empty( $fields[ $key ]['custom_dropdown_options_source'] ) &&
function_exists( $fields[ $key ]['custom_dropdown_options_source'] ) ){
$arr_options = call_user_func( $fields[ $key ]['custom_dropdown_options_source'] );
$fields[ $key ]['options'] = array_keys( $arr_options );
}
// Unset changed value that doesn't match the option list