search_link filter-hookWP 3.0.0

Filters the search permalink.

Usage

add_filter( 'search_link', 'wp_kama_search_link_filter', 10, 2 );

/**
 * Function for `search_link` filter-hook.
 * 
 * @param string $link   Search permalink.
 * @param string $search The URL-encoded search term.
 *
 * @return string
 */
function wp_kama_search_link_filter( $link, $search ){

	// filter...
	return $link;
}
$link(string)
Search permalink.
$search(string)
The URL-encoded search term.

Changelog

Since 3.0.0 Introduced.

Where the hook is called

get_search_link()
search_link
wp-includes/link-template.php 1209
return apply_filters( 'search_link', $link, $search );

Where the hook is used in WordPress

Usage not found.