[Plugin: Tweetable] Date-time xx minutes ago
-
Hello,
I changed your plugin that it displays the time since the publication of the tweet.
E.g. “8 minutes ago” or “2 hours ago”.
Plugin author: maybe you can add this to the plugin.
tweetable.php (from line 168)
foreach ( $latest['tweets'] as $tweet ) { echo '<li class="tweetable_item">'; $time = strtotime($tweet['created_at']); if (( abs(time() - $time) ) < 86400) $h_time = sprintf('%s ago', human_time_diff($time)); else $h_time = date_i18n('j F Y G:i', $time); echo '<span class="twitter_status">'; echo '<span class="status-text">'.make_clickable($tweet['text']).'</span>'; echo '<span class="twitter_meta"><abbr title="' . date('d-m-Y H:i:s', $time) . '">' . $h_time . '</abbr></span>'; echo '</span>'; echo '</li>'; if ($counter == $options['num_tweets']-1) { break; } $counter++; }
- The topic ‘[Plugin: Tweetable] Date-time xx minutes ago’ is closed to new replies.