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