WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 736 | $permastruct = $wp_rewrite->get_search_permastruct(); |
| 737 | |
| 738 | if ( empty($permastruct) ) { |
| 739 | $link = add_query_arg('feed', $feed, $link); |
| 740 | } else { |
| 741 | $link = trailingslashit($link); |
| 742 | $link .= "feed/$feed/"; |
| 743 | } |
| 744 | |
| 745 | $link = apply_filters('search_feed_link', $link, $feed, 'posts'); |
| 746 | |
| 747 | return $link; |
| 748 | } |
| 749 | |
| 750 | /** |
| 751 | * Retrieve the permalink for the comments feed of the search results. |
| 752 | * |
| 753 | * @since 2.5.0 |
| 754 | * |
| Line | Code |
| 765 | $link = get_search_feed_link($search_query, $feed); |
| 766 | |
| 767 | $permastruct = $wp_rewrite->get_search_permastruct(); |
| 768 | |
| 769 | if ( empty($permastruct) ) |
| 770 | $link = add_query_arg('feed', 'comments-' . $feed, $link); |
| 771 | else |
| 772 | $link = add_query_arg('withcomments', 1, $link); |
| 773 | |
| 774 | $link = apply_filters('search_feed_link', $link, $feed, 'comments'); |
| 775 | |
| 776 | return $link; |
| 777 | } |
| 778 | |
| 779 | /** |
| 780 | * Retrieve edit posts link for post. |
| 781 | * |
| 782 | * Can be used within the WordPress loop or outside of it. Can be used with |
| 783 | * pages, posts, attachments, and revisions. |