Permalink
Browse files

Merge pull request #29 from adrianthomas/patch-1

Update plugins/tweets/tweets.php
  • Loading branch information...
2 parents 7e91f41 + ca93de0 commit d258f2413901d0b1a90f5c8a74dbc89443ae14eb @bastianallgeier committed Jan 4, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 plugins/tweets/tweets.php
View
5 plugins/tweets/tweets.php
@@ -5,6 +5,7 @@ function tweets($username, $params=array()) {
$defaults = array(
'limit' => 10,
'cache' => true,
+ 'hiderep' => false, //Parameter to hide replies in your feed - for accounts with high reply volumes
'refresh' => 60*20 // refresh every 20 minutes
);
@@ -34,7 +35,7 @@ function tweets($username, $params=array()) {
if(!empty($cache)) return $cache;
- $url = 'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $options['username'] . '&count=' . $options['limit'] . '&include_rts=true';
+ $url = 'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $options['username'] . '&count=' . $options['limit'] . '&include_rts=true' . '&exclude_replies=' . $options['hiderep'];
$json = @file_get_contents($url);
$data = str::parse($json);
@@ -89,4 +90,4 @@ static function link($text) {
return $text;
}
-}
+}

0 comments on commit d258f24

Please sign in to comment.