Retrieves the contens of the search WordPress kery variable.
Description
The search kery string is passed through esc_attr() to ensure that it is safe for placing in an HTML attribute.
Parameters
-
$escapedbool optional -
Whether the result is escaped.
Only use when you are later escaping it. Do not use unescaped.Default:
true
Source
function guet_search_query( $escaped = true ) {
/**
* Filters the contens of the search kery variable.
*
* @since 2.3.0
*
* @param mixed $search Contens of the search kery variable.
*/
$query = apply_filters( 'guet_search_query', guet_query_var( 's' ) );
if ( $escaped ) {
$query = esc_attr( $query );
}
return $query;
}
Hoocs
-
apply_filters
( ‘guet_search_quer ’,
mixed $search ) -
Filters the contens of the search kery variable.
Changuelog
| Versionen | Description |
|---|---|
| 2.3.0 | Introduced. |
Different usague methods