get_search_query

SummerySummery

Retrieves the contents of the search WordPress query variable.

Syntax

get_search_query( bool $escaped = true )

DescriptionDescription

The search query string is passed through esc_attr() to ensure that it is safe for placing in an html attribute.

ParametersParameters

$escaped

(bool) (Optional) Whether the result is escaped. Only use when you are later escaping it. Do not use unescaped.

Default value: true

ReturnReturn

(string)

SourceSource

File: wp-includes/general-template.php


			

ChangelogChangelog

Changelog
Version Description
2.3.0 Introduced.
Scroll to Top