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 |
---|---|
1031 | /** |
1032 | * Filter the search feed link. |
1033 | * |
1034 | * @since 2.5.0 |
1035 | * |
1036 | * @param string $link Search feed link. |
1037 | * @param string $feed Feed type. |
1038 | * @param string $type The search type. One of 'posts' or 'comments'. |
1039 | */ |
1040 | $link = apply_filters( 'search_feed_link', $link, $feed, 'posts' ); |
1041 |
|
1042 | return $link; |
1043 | } |
1044 |
|
1045 | /** |
1046 | * Retrieve the permalink for the comments feed of the search results. |
1047 | * |
1048 | * @since 2.5.0 |
1049 | * |
Line | Code |
1061 |
|
1062 | $permastruct = $wp_rewrite->get_search_permastruct(); |
1063 |
|
1064 | if ( empty($permastruct) ) |
1065 | $link = add_query_arg('feed', 'comments-' . $feed, $link); |
1066 | else |
1067 | $link = add_query_arg('withcomments', 1, $link); |
1068 |
|
1069 | /** This filter is documented in wp-includes/link-template.php */ |
1070 | $link = apply_filters('search_feed_link', $link, $feed, 'comments'); |
1071 |
|
1072 | return $link; |
1073 | } |
1074 |
|
1075 | /** |
1076 | * Retrieve the permalink for a post type archive. |
1077 | * |
1078 | * @since 3.1.0 |
1079 | * |