get_search_feed_link and get_search_comments_feed_link from ionfish. fixes #5442
git-svn-id: https://develop.svn.wordpress.org/trunk@6413 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
996d913b0e
commit
a62059d49e
@ -397,6 +397,38 @@ function get_tag_feed_link($tag_id, $feed = '') {
|
||||
return $link;
|
||||
}
|
||||
|
||||
function get_search_feed_link($search_query = '', $feed = '') {
|
||||
if ( empty($search_query) )
|
||||
$search = attribute_escape(get_search_query());
|
||||
else
|
||||
$search = attribute_escape(stripslashes($search_query));
|
||||
|
||||
if ( empty($feed) )
|
||||
$feed = get_default_feed();
|
||||
|
||||
$link = get_option('home') . "?s=$search&feed=$feed";
|
||||
|
||||
$link = apply_filters('search_feed_link', $link);
|
||||
|
||||
return $link;
|
||||
}
|
||||
|
||||
function get_search_comments_feed_link($search_query = '', $feed = '') {
|
||||
if ( empty($search_query) )
|
||||
$search = attribute_escape(get_search_query());
|
||||
else
|
||||
$search = attribute_escape(stripslashes($search_query));
|
||||
|
||||
if ( empty($feed) )
|
||||
$feed = get_default_feed();
|
||||
|
||||
$link = get_option('home') . "?s=$search&feed=comments-$feed";
|
||||
|
||||
$link = apply_filters('search_feed_link', $link);
|
||||
|
||||
return $link;
|
||||
}
|
||||
|
||||
function get_edit_post_link( $id = 0 ) {
|
||||
$post = &get_post( $id );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user