get_search_query
get_search_query ( $escaped = true )
Parameters:- (bool) escaped Whether the result is escaped. Default true. Only use when you are later escaping it. Do not use unescaped.
Returns:Defined at: - Introduced in WordPress: 2.3.0
- Deprecated in WordPress: —
Description
Retrieves the contents of the search WordPress query variable.The search query string is passed through esc_attr() to ensure that it is safe
for placing in an HTML attribute.