search_feed_link
Filters the search feed link.
Использование
add_filter( 'search_feed_link', 'wp_kama_search_feed_link_filter', 10, 3 );
/**
* Function for `search_feed_link` filter-hook.
*
* @param string $link Search feed link.
* @param string $feed Feed type. Possible values include 'rss2', 'atom'.
* @param string $type The search type. One of 'posts' or 'comments'.
*
* @return string
*/
function wp_kama_search_feed_link_filter( $link, $feed, $type ){
// filter...
return $link;
}
- $link(строка)
- Search feed link.
- $feed(строка)
- Feed type. Possible values include 'rss2', 'atom'.
- $type(строка)
- The search type. One of 'posts' or 'comments'.
Список изменений
| С версии 2.5.0 | Введена. |
Где вызывается хук
search_feed_link
search_feed_link
wp-includes/link-template.php 1254
return apply_filters( 'search_feed_link', $link, $feed, 'posts' );
wp-includes/link-template.php 1287
return apply_filters( 'search_feed_link', $link, $feed, 'comments' );