WPDev.one
Core Function
View Source on Trac ↗

get_search_query()

get_search_query( mixed $escaped = true )

Retrieves the contents of the search WordPress query variable.

Parameters 1 required

Name / Type Description
bool

$escaped Whether the result is escaped. Default true. Only use when you are later escaping it. Do not use unescaped.

Required

Return Value

(string)
string

Function Information

Since Version
2.3.0
Source File
wp-includes/general-template.php
Advertisement