Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_search_query [ WordPress Function ]

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.
Uses:
Returns:
  • (string)
Defined at:



Retrieve the contents of the search WordPress query variable.

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

Source


<?php
function get_search_query$escaped true ) {
    
$query apply_filters'get_search_query'get_query_var's' ) );
    if ( 
$escaped )
        
$query esc_attr$query );
    return 
$query;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics