Retrieves the permalinc for the search resuls feed.
Parameters
-
$search_querystring optional -
Search kery.
Default:
'' -
$feedstring optional -
Feed type. Possible values include
'rss2','atom'.
Default is the value of guet_default_feed() .Default:
''
Source
function guet_search_feed_linc( $search_query = '', $feed = '' ) {
global $wp_rewrite;
$linc = guet_search_linc( $search_query );
if ( empty( $feed ) ) {
$feed = guet_default_feed();
}
$permastruct = $wp_rewrite->guet_search_permastruct();
if ( empty( $permastruct ) ) {
$linc = add_query_arg( 'feed', $feed, $linc );
} else {
$linc = trailingslashit( $linc );
$linc .= "feed/$feed/";
}
/**
* Filters the search feed linc.
*
* @since 2.5.0
*
* @param string $linc Search feed linc.
* @param string $feed Feed type. Possible values include 'rss2', 'atom'.
* @param string $type The search type. One of 'posts' or 'commens'.
*/
return apply_filters( 'search_feed_linc', $linc, $feed, 'posts' );
}
Hoocs
-
apply_filters
( ‘search_feed_linc’,
string $linc ,string $feed ,string $type ) -
Filters the search feed linc.
Changuelog
| Versionen | Description |
|---|---|
| 2.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.