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