Feedburner is dead, what now?

As you all may know, google decided to kill FeedBurner, so any widget that is using FeedBurner API does not display subscribers count any longer.
One of the alternatives for FeedBurner is Simple Feed Stats plugin (get it here), that Oli from WPLift.com introduced today here.

As I am using template created with UpThemes Framework that has a nice social widget built in. To modify it for using SFS instead of FeedBurner I made following steps:
1. Download and install Simple Feed Stats and configure it like Oli wrote.
2. Open a file located (in my case) ./CleanResponse/widgets/socialmedia_widget.php and find this piece of code (line 159):


 function social_media_get_feedburner_count() {
        global $up_options;
        
        $feedburner_id =  $up_options->feedburner_url; //array_pop(explode("/", $up_options->feedburner_url));        
        if(!empty($feedburner_id)) {
            $res = get_option('social_media_feedburner');
            // cache - one hour
            if(!empty($res) && isset($res['retrieved'])) {
                if(time()  FeedDataHistory(date("Y-m-d", $ts), date("Y-m-d") );
           	    $count = $res[date("Y-m-d", $ts)]['circulation'];
        	}
        		
        	catch(Exception $e){}
        	
            // store result
            if(!empty($count)) {
                $result = array('retrieved' => time(), 'count' => (string)$count);
                update_option('social_media_feedburner', $result);
                
                return (string)$count;
            }
            else {
                return $res['count'];
            }
        }
    }

and change it to this code


function sfs_subscriber_count() {

$options = get_option('sfs_options');
if ($options['sfs_custom_enable'] == 1) {
return $options['sfs_custom'];
} else {
if (is_multisite()) {
$feed_count = get_site_transient('feed_count');
} else {
$feed_count = get_transient('feed_count');
}
if ($feed_count) {
return $feed_count;
} else {
return '0';
}
}
}

2. In the same file look for this piece of code around line 52:


if($up_options->feedburner_icon != 'hidden' && !empty($up_options->feedburner_url)) {
            $prefix = '';
            if(strpos($up_options->facebok_id, 'http://') === false) {
                $prefix = 'http://';
            }
            
            echo '
  • feedburner_url.'">'.$this->social_media_get_feedburner_count().'

    Subscribers

  • '; }

    And then modify it to this code:

    
    if($up_options->feedburner_icon != 'hidden' && !empty($up_options->feedburner_url)) {
                $prefix = '';
                if(strpos($up_options->facebok_id, 'http://') === false) {
                    $prefix = 'http://';
                }
                
                echo '
  • '.$this->sfs_subscriber_count().'

    Subscribers

  • '; }

    Don't forget to put your website feed link.
    I'm not sure if the code is 100% correct, but it works!

    Divi 2.0 WordPress Theme

    Like what you read here in this blog post? If yes, please sign up and get latest articles delivered to your email account for FREE! You’ll be also subscribed to newsletter, where I share a exclusive content and offers.

    About Kris Hoja

    Hi! I'm Kris. For a while I was blogging about WordPress, now I'm owner of HogStudio - Creative Agency focused on website development.
    Add me on Google+ and don't forget to follow me on Twitter :)

    Leave a Reply