mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-19 22:54:03 +09:00
- fixed callback select-type filters handlers on member directories filters bar;
This commit is contained in:
@@ -523,9 +523,9 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
$custom_dropdown = '';
|
||||
if ( ! empty( $attrs['custom_dropdown_options_source'] ) ) {
|
||||
$attrs['custom'] = true;
|
||||
$attrs['options'] = UM()->fields()->get_options_from_callback( $attrs, $attrs['type'] );
|
||||
|
||||
if ( ! empty( $attrs['parent_dropdown_relationship'] ) ) {
|
||||
|
||||
$custom_dropdown .= ' data-member-directory="yes"';
|
||||
$custom_dropdown .= ' data-um-parent="' . esc_attr( $attrs['parent_dropdown_relationship'] ) . '"';
|
||||
|
||||
@@ -537,6 +537,8 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
|
||||
$ajax_source = apply_filters( "um_custom_dropdown_options_source__{$filter}", $attrs['custom_dropdown_options_source'], $attrs );
|
||||
$custom_dropdown .= ' data-um-ajax-source="' . esc_attr( $ajax_source ) . '" ';
|
||||
|
||||
$attrs['options'] = UM()->fields()->get_options_from_callback( $attrs, $attrs['type'] );
|
||||
}
|
||||
|
||||
if ( $attrs['metakey'] != 'role_select' && empty( $custom_dropdown ) ) {
|
||||
@@ -553,6 +555,10 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ( ! empty( $attrs['custom_dropdown_options_source'] ) && ! empty( $attrs['parent_dropdown_relationship'] ) ) {
|
||||
$attrs['options'] = array();
|
||||
}
|
||||
|
||||
if ( isset( $attrs['label'] ) ) {
|
||||
$attrs['label'] = strip_tags( $attrs['label'] );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user