- updated search users form shortcode for integrate with new member directories;

This commit is contained in:
nikitasinelnikov
2019-10-18 13:01:40 +03:00
parent 6e7eee89bf
commit 3122e79e37
13 changed files with 232 additions and 142 deletions
-47
View File
@@ -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
*