"footerstring", "label" => __("Content to put in the footer", 'rss-footer'), "desc" => __("(HTML allowed)", 'rss-footer'), "content" => '', ); $rows[] = array( "label" => __('Explanation', 'rss-footer'), "content" => '

'.__('You can use the following variables within the content, they will be replaced by the value on the right.', 'rss-footer').'

'. '
    '. '
  • %%POSTLINK%% : '.__('A link to the post, with the title as anchor text.', 'rss-footer').'
  • '. '
  • %%POSTTITLE%% : ' .__('Title of the post.', 'rss-footer').'
  • '. '
  • %%POSTTAGS%% : ' .__('Tags of the post.', 'rss-footer').'
  • '. '
  • %%BLOGLINK%% : '.__("A link to your site, with your site's name as anchor text.", 'rss-footer').'
  • '. '
  • %%BLOGDESCLINK%% : '.__("A link to your site, with your site's name and description as anchor text.", 'rss-footer').'
  • '. '
'. '

'.__('If you update the text above, check the preview below:', 'rss-footer').'

', ); $this->postbox('rssfootercontent',__('Content of your RSS Footer', 'rss-footer'),$this->form_table($rows)); $this->postbox('rssfooterpreview',__('Preview of your RSS Footer', 'rss-footer'),'
'.__('You need JavaScript enabled for the preview to work.', 'rss-footer').'
'); $rows = array(); $rows[] = array( "id" => "position", "label" => __("Content position", 'rss-footer'), "content" => '', ); $rows[] = array( "label" => __('Explanation', 'rss-footer'), "content" => __("The position determines whether the content you've entered above will appear below or above the post.", 'rss-footer') ); $this->postbox('rssfootersettings','Settings',$this->form_table($rows)); ?>
plugin_like(); $this->plugin_support(); $this->news(); ?>



".get_bloginfo('name').""; $options['position'] = "after"; update_option('RSSFooterOptions', $options); } elseif ($options['everset'] === true) { if ($options['position'] == "after") { $options['footerstring'] = $options['footerstring']."

%%POSTLINK%%"; } else { $options['footerstring'] = "%%POSTLINK%%

".$options['footerstring']; } $options['everset'] = 2; update_option('RSSFooterOptions', $options); } function embed_rssfooter($content) { if(is_feed()) { $options = get_option('RSSFooterOptions'); $postlink = get_permalink(); $posttitle = get_the_title(); $posttags = the_tags('Post tags: ', ', ', ''); $bloglink = ''.get_bloginfo('name').''; $blogdesclink = ''.get_bloginfo('name').' - '.get_bloginfo('description').''; $rssfootcontent = stripslashes($options['footerstring']); $rssfootcontent = str_replace("%%POSTLINK%%",$postlink,$rssfootcontent); $rssfootcontent = str_replace("%%POSTTITLE%%",$posttitle,$rssfootcontent); $rssfootcontent = str_replace("%%POSTTAGS%%",$posttags,$rssfootcontent); $rssfootcontent = str_replace("%%BLOGLINK%%",$bloglink,$rssfootcontent); $rssfootcontent = str_replace("%%BLOGDESCLINK%%",$blogdesclink,$rssfootcontent); if ($options['position'] == "before") { $content = "

" . $rssfootcontent . "

\n" . $content; } else { $content .= "

" . $rssfootcontent . "

\n"; } } return $content; } add_filter('the_content', 'embed_rssfooter'); add_filter('the_excerpt_rss', 'embed_rssfooter'); ?>