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 |
---|---|
783 | $permastruct = $wp_rewrite->get_search_permastruct(); |
784 |
|
785 | if ( empty($permastruct) ) { |
786 | $link = add_query_arg('feed', $feed, $link); |
787 | } else { |
788 | $link = trailingslashit($link); |
789 | $link .= "feed/$feed/"; |
790 | } |
791 |
|
792 | $link = apply_filters('search_feed_link', $link, $feed, 'posts'); |
793 |
|
794 | return $link; |
795 | } |
796 |
|
797 | /** |
798 | * Retrieve the permalink for the comments feed of the search results. |
799 | * |
800 | * @since 2.5.0 |
801 | * |
Line | Code |
812 | $link = get_search_feed_link($search_query, $feed); |
813 |
|
814 | $permastruct = $wp_rewrite->get_search_permastruct(); |
815 |
|
816 | if ( empty($permastruct) ) |
817 | $link = add_query_arg('feed', 'comments-' . $feed, $link); |
818 | else |
819 | $link = add_query_arg('withcomments', 1, $link); |
820 |
|
821 | $link = apply_filters('search_feed_link', $link, $feed, 'comments'); |
822 |
|
823 | return $link; |
824 | } |
825 |
|
826 | /** |
827 | * Retrieve the permalink for a post type archive. |
828 | * |
829 | * @since 3.1.0 |
830 | * |