Fix #353 - Add conditional feed link, thanks @zslabs

This commit is contained in:
Ben Word
2012-04-10 21:20:44 -06:00
parent 53dc8f3b2b
commit c1ee5717bd
2 changed files with 8 additions and 2 deletions

View File

@@ -1,5 +1,13 @@
<?php
function roots_feed_link() {
$count = wp_count_posts('post'); if ($count->publish > 0) {
echo "\n\t<link rel=\"alternate\" type=\"application/rss+xml\" title=\"". get_bloginfo('name') ." Feed\" href=\"". home_url() ."/feed/\">\n";
}
}
add_action('roots_head', 'roots_feed_link');
function roots_google_analytics() {
$roots_google_analytics_id = GOOGLE_ANALYTICS_ID;
if ($roots_google_analytics_id !== '') {