Definition:
function get_feed_link($feed = '') {}
Retrieve the permalink for the feed type.
Parameters
- string $feed: Optional, defaults to default feed. Feed type.
Source code
function get_feed_link($feed = '') { global $wp_rewrite; $permalink = $wp_rewrite->get_feed_permastruct(); if ( '' != $permalink ) { if ( false !== strpos($feed, 'comments_') ) { $feed = str_replace('comments_', '', $feed); $permalink = $wp_rewrite->get_comment_feed_permastruct(); } if ( get_default_feed() == $feed ) $feed = ''; $permalink = str_replace('%feed%', $feed, $permalink); $permalink = preg_replace('#/+#', '/', "/$permalink"); $output = home_url( user_trailingslashit($permalink, 'feed') ); } else { if ( empty($feed) ) $feed = get_default_feed(); if ( false !== strpos($feed, 'comments_') ) $feed = str_replace('comments_', 'comments-', $feed); $output = home_url("?feed={$feed}"); }
1388
No comments yet... Be the first to leave a reply!