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