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 | 
|---|---|
| 1245 |      /** | 
| 1246 |       * Filters the search feed link. | 
| 1247 |       * | 
| 1248 |       * @since 2.5.0 | 
| 1249 |       * | 
| 1250 |       * @param string $link Search feed link. | 
| 1251 |       * @param string $feed Feed type. Possible values include 'rss2', 'atom'. | 
| 1252 |       * @param string $type The search type. One of 'posts' or 'comments'. | 
| 1253 |       */ | 
| 1254 |      return apply_filters( 'search_feed_link', $link, $feed, 'posts' ); | 
| 1255 | } | 
| 1256 |  | 
| 1257 | /** | 
| 1258 |  * Retrieves the permalink for the search results comments feed. | 
| 1259 |  * | 
| 1260 |  * @since 2.5.0 | 
| 1261 |  * | 
| 1262 |  * @global WP_Rewrite $wp_rewrite WordPress rewrite component. | 
| 1263 |  * | 
| Line | Code | 
| 1278 |      $permastruct = $wp_rewrite->get_search_permastruct(); | 
| 1279 |  | 
| 1280 |      if ( empty( $permastruct ) ) { | 
| 1281 |           $link = add_query_arg( 'feed', 'comments-' . $feed, $link ); | 
| 1282 |      } else { | 
| 1283 |           $link = add_query_arg( 'withcomments', 1, $link ); | 
| 1284 |      } | 
| 1285 |  | 
| 1286 |      /** This filter is documented in wp-includes/link-template.php */ | 
| 1287 |      return apply_filters( 'search_feed_link', $link, $feed, 'comments' ); | 
| 1288 | } | 
| 1289 |  | 
| 1290 | /** | 
| 1291 |  * Retrieves the permalink for a post type archive. | 
| 1292 |  * | 
| 1293 |  * @since 3.1.0 | 
| 1294 |  * @since 4.5.0 Support for posts was added. | 
| 1295 |  * | 
| 1296 |  * @global WP_Rewrite $wp_rewrite WordPress rewrite component. |