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 |
---|---|
1057 | /** |
1058 | * Filter the search feed link. |
1059 | * |
1060 | * @since 2.5.0 |
1061 | * |
1062 | * @param string $link Search feed link. |
1063 | * @param string $feed Feed type. |
1064 | * @param string $type The search type. One of 'posts' or 'comments'. |
1065 | */ |
1066 | return apply_filters( 'search_feed_link', $link, $feed, 'posts' ); |
1067 | } |
1068 |
|
1069 | /** |
1070 | * Retrieve the permalink for the comments feed of the search results. |
1071 | * |
1072 | * @since 2.5.0 |
1073 | * |
1074 | * @global WP_Rewrite $wp_rewrite |
1075 | * |
Line | Code |
1087 |
|
1088 | $permastruct = $wp_rewrite->get_search_permastruct(); |
1089 |
|
1090 | if ( empty($permastruct) ) |
1091 | $link = add_query_arg('feed', 'comments-' . $feed, $link); |
1092 | else |
1093 | $link = add_query_arg('withcomments', 1, $link); |
1094 |
|
1095 | /** This filter is documented in wp-includes/link-template.php */ |
1096 | return apply_filters( 'search_feed_link', $link, $feed, 'comments' ); |
1097 | } |
1098 |
|
1099 | /** |
1100 | * Retrieve the permalink for a post type archive. |
1101 | * |
1102 | * @since 3.1.0 |
1103 | * |
1104 | * @global WP_Rewrite $wp_rewrite |
1105 | * |