mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- added callbacks blacklist. Added PHP command execution functions here to exclude the running them from the custom callback;
This commit is contained in:
@@ -95,8 +95,10 @@ if ( ! class_exists( 'um\core\Validation' ) ) {
|
||||
isset( $fields[ $key ]['custom_dropdown_options_source'] ) &&
|
||||
! 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 );
|
||||
if ( ! in_array( $fields[ $key ]['custom_dropdown_options_source'], UM()->fields()->dropdown_options_source_blacklist(), true ) ) {
|
||||
$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
|
||||
|
||||
Reference in New Issue
Block a user