- fixed custom callback member directories filters with child dropdown filters;

This commit is contained in:
Mykyta Synelnikov
2023-10-13 15:35:39 +03:00
parent 217bfe819b
commit 3ccb9cf619
5 changed files with 24 additions and 15 deletions
+2 -4
View File
@@ -1465,11 +1465,10 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
*
* @return array $arr_options
*/
function get_options_from_callback( $data, $type ) {
public function get_options_from_callback( $data, $type ) {
$arr_options = array();
if ( in_array( $type, array( 'select', 'multiselect' ) ) && ! empty( $data['custom_dropdown_options_source'] ) ) {
if ( ! empty( $data['custom_dropdown_options_source'] ) && in_array( $type, array( 'select', 'multiselect' ), true ) ) {
if ( $this->is_source_blacklisted( $data['custom_dropdown_options_source'] ) ) {
return $arr_options;
}
@@ -1481,7 +1480,6 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
$arr_options = call_user_func( $data['custom_dropdown_options_source'] );
}
}
}
return $arr_options;