um_filter_search

Filters the search query.

Description

(string) um_filter_search( (string) $search ); 

Returns (string)

Parameters (1)

0. $search (string)
The search.

Usage

  1. if ( !function_exists( 'um_filter_search' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ultimate-member/core/um-short-functions.php'; 
  3.  
  4. // The search. 
  5. $search = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = um_filter_search($search); 
  9.  

Defined (1)

The function is defined in the following location(s).

/core/um-short-functions.php  
  1. function um_filter_search($search) { 
  2. $search = trim( strip_tags( $search ) ); 
  3. $search = preg_replace('/[^a-z \.\@\_\-]+/i', '', $search); 
  4.  
  5. return $search;