From 9a2df1fee34ae453d4e022328cfa83cff29a1780 Mon Sep 17 00:00:00 2001 From: Champ Camba Date: Thu, 25 Jul 2019 01:52:38 +0800 Subject: [PATCH] Fix retrieval of options from callback function --- includes/core/class-validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/core/class-validation.php b/includes/core/class-validation.php index ae0f38b5..9645bfbb 100644 --- a/includes/core/class-validation.php +++ b/includes/core/class-validation.php @@ -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