Trivial WordPress plugin for Feedburner

by Roger Collins on December 18, 2009

in Programming

I wrote this plugin to use Feedburner to track my feed traffic.  I thought it noteworthy because it might be the smallest practical plugin period.  By replacing this URL in a custom plugin rather than the template, I can manage templates (update them, switch them, etc.) without having to make this change in each one.

<?php
/*
Plugin Name: Feedburner Hardcode
Plugin URI: http://rogercollins.com/#
Description: Just replaces the wordpress feed URLs with a hardcoded Feedburner URL
Author: Roger Collins
Version: 1.0.0
Author URI: http://rogercollins.com
*/

function FbHard_feed_link($url, $feed_type)
{
return “http://feeds.rogercollins.com/InternetLake”;
}

add_filter(‘feed_link’, ‘FbHard_feed_link’);

?>

Just put this code in a file (I named it feedburner_hardcode.php) in your wp-content/plugins directory.  (Change the hard-coded feedburner URL of course.)  And activate it in the admin panel in the Plugins menu.

I know there is a FeedSmith plugin for using Feedburner with WordPress, but it uses redirects and I just prefer to be more direct than that.

Hereby released into the public domain.  Just drop me a comment if you use it.

Cheers!

{ 1 trackback }

Recent updates, traffic up 121% | Internet Lake
January 11, 2010 at 8:33 am

{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: