示例#1
0
文件: plugin.php 项目: rthees/podlove
/**
 * Adds feed discover links to WordPress head.
 *
 * @todo find a better place for this function
 */
function add_feed_discoverability()
{
    if (is_admin()) {
        return;
    }
    $feeds = \Podlove\Model\Feed::find_all_by_discoverable(1);
    foreach ($feeds as $feed) {
        echo '<link rel="alternate" type="' . $feed->get_content_type() . '" title="' . esc_attr($feed->title_for_discovery()) . '" href="' . $feed->get_subscribe_url() . "\" />\n";
    }
}