get_search_query()

来源:柚子科技 WordPress 主题、WordPress插件    date:2022-8-5    标签:    WordPress主题themes插件plugins开发定制
get_search_query( bool $escaped = true )

检索搜索WordPress查询变量的内容。

描述

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

参数

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

Default value: true

get_search_query()通常与get_search_form()一起使用。