/** * Hook into the feed content * @param type $content * @param type $feed_type * @return $content * @see http://wp.smashingmagazine.com/2011/12/07/10-tips-optimize-wordpress-theme/ */ function ts_feed_spruce_the_content_feed($content, $feed_type) { global $post; /* if (has_post_thumbnail($post->ID) ) $content = '<p>' . get_the_post_thumbnail($post->ID, 'thumbnail') . '</p>' . $content; */ $options = ts_feed_spruce_get_options(); if ($options['sociallinks']) { $content .= '<p class="social-links">'; $content .= ts_feed_spruce_get_social_links(get_permalink(), get_the_title_rss()); $content .= '</p>'; } if (!empty($options['append'])) { $content .= '<p class="appended">'; $content .= str_ireplace(array('%id%', '%url%'), array(get_the_ID(), apply_filters('the_permalink_rss', get_permalink())), $options['append']); $content .= '</p>'; } return $content; }
function ts_feed_spruce_option_field_sociallinks() { $options = ts_feed_spruce_get_options(); $name = 'sociallinks'; $description = __('Append a band of social sharing buttons to each item.'); _ts_feed_spruce_option_field_bool($name, $options[$name], $description); echo '<br /><div class="social-links-preview image-preview">'; echo ts_feed_spruce_get_social_links(get_bloginfo('url'), get_bloginfo('name')); echo '</div>'; }