mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- added filter for show meta HTML;
- removed redundant code from member directories class;
This commit is contained in:
@@ -1208,7 +1208,7 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
}
|
||||
|
||||
// Add OR instead AND to search in WP core fields user_email, user_login, user_display_name
|
||||
$search_where = $context->get_search_sql( $search, UM()->member_directory()->core_search_fields, 'both' );
|
||||
$search_where = $context->get_search_sql( $search, $this->core_search_fields, 'both' );
|
||||
|
||||
$search_where = preg_replace( '/ AND \((.*?)\)/im', "$1 OR", $search_where );
|
||||
|
||||
@@ -1225,17 +1225,6 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Use OR in search query if there is only searching, but with filters there will be AND conditional
|
||||
* @param $replacement
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function organic_replacement( $replacement ) {
|
||||
return " OR ( $1 )";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handle filters request
|
||||
*/
|
||||
@@ -1249,10 +1238,10 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
// added for user tags extension integration on individual tag page
|
||||
$ignore_empty_filters = apply_filters( 'um_member_directory_ignore_empty_filters', false );
|
||||
|
||||
if ( empty( $filter_query ) && ! $ignore_empty_filters ) {
|
||||
//add_filter( 'um_member_directory_organic_search_replacement', array( &$this, 'organic_replacement' ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -394,7 +394,7 @@ if ( ! class_exists( 'um\core\Profile' ) ) {
|
||||
$icon = ! empty( $data['icon'] ) ? '<i class="' . $data['icon'] . '"></i>' : '';
|
||||
}
|
||||
|
||||
$items[] = '<span>' . $icon . $value . '</span>';
|
||||
$items[] = apply_filters( 'um_show_meta_item_html', '<span>' . $icon . $value . '</span>', $key );
|
||||
$items[] = '<span class="b">•</span>';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user