Fix link issue in Twitter client of Fusion theme


When I tried out the Twitter client in fusion theme I noticed that the urls are wrong in that client. The URL in my client were like http://blog.sriunplugged.com/”http://search.twitter.com/search?q=%23Home” . So after a bit of digging into I found that the file wp-content/themes/fusion/functions.php contains the php code for generating the contents of widget. So the issue was that it was echoing the contents as such after getting from twitter. So Twitter already has quotes in the link this was the one that was making link wrong. So the fix was a small. Insert into the function fusion_TwitterWidget() the line mentioned below
Update: I edited the function again to add my twitter link too.

function fusion_TwitterWidget($args){
 extract($args);
 echo $before_widget;
print $before_title.__('<a href="http://www.twitter.com/'.get_option('fusion_twitterid').'">Twitter posts</a>','fusion').$after_title; ?>// edit this for adding link to twitter account
 for ($i = 1; $i <= $amount; $i++) {
   $cleaner = explode("</content>", $clean[$i]);
   print '<li class="entry">';
   $cleaner[0] = str_replace("&quot;", "", $cleaner[0]); // Insert this line into the function for link correction
   echo $cleaner[0];
   print '</li>';

, , , ,

  1. #1 by Tiranga Agarbatti on January 2, 2010 - 4:34 am

    Thanks for sharing the code snippet. The fix was a small. Insert into the function fusion_TwitterWidget() the line mentioned. It works correctly.

  2. #2 by السعوديه on January 3, 2010 - 12:39 am

    thank you dear …

    nice .

(will not be published)


  1. Fix link issue in Twitter client of Fusion theme | Srijith Unplugged | Drakz Free Online Service