mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-20 15:13:55 +09:00
- updated search users form shortcode for integrate with new member directories;
This commit is contained in:
@@ -2547,53 +2547,6 @@ function um_force_utf8_string( $value ) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Filters the search query.
|
||||
*
|
||||
* @param string $search
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function um_filter_search( $search ) {
|
||||
$search = trim( strip_tags( $search ) );
|
||||
$search = preg_replace( '/[^a-z \.\@\_\-]+/i', '', $search );
|
||||
|
||||
return $search;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the user search query
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function um_get_search_query() {
|
||||
$query = UM()->permalinks()->get_query_array();
|
||||
$search = isset( $query['search'] ) ? $query['search'] : '';
|
||||
|
||||
return um_filter_search( $search );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the ultimate member search form
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function um_get_search_form() {
|
||||
return do_shortcode( '[ultimatemember_searchform]' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Display the search form.
|
||||
*
|
||||
*/
|
||||
function um_search_form() {
|
||||
echo um_get_search_form();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get user host
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user