Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: search_feed_link

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
787      $permastruct = $wp_rewrite->get_search_permastruct();
788
789      if ( empty($permastruct) ) {
790           $link = add_query_arg('feed', $feed, $link);
791      } else {
792           $link = trailingslashit($link);
793           $link .= "feed/$feed/";
794      }
795
796      $link = apply_filters('search_feed_link', $link, $feed, 'posts');
797
798      return $link;
799 }
800
801 /**
802  * Retrieve the permalink for the comments feed of the search results.
803  *
804  * @since 2.5.0
805  *
 
Line Code
816      $link = get_search_feed_link($search_query, $feed);
817
818      $permastruct = $wp_rewrite->get_search_permastruct();
819
820      if ( empty($permastruct) )
821           $link = add_query_arg('feed', 'comments-' . $feed, $link);
822      else
823           $link = add_query_arg('withcomments', 1, $link);
824
825      $link = apply_filters('search_feed_link', $link, $feed, 'comments');
826
827      return $link;
828 }
829
830 /**
831  * Retrieve the permalink for a post type archive.
832  *
833  * @since 3.1.0
834  *