You are here

function _theme_time_ago in Heartbeat 6.4

Same name and namespace in other branches
  1. 7 heartbeat.module \_theme_time_ago()

Pseudo theme function to render the time ago link. This is implemented much like facebook does.

Return value

String output of time.

5 calls to _theme_time_ago()
heartbeat_comments_token_values in modules/heartbeat_comments/heartbeat_comments.module
Implementation of hook_token_values().
hrules_token_values in modules/heartbeat_rules/hrules.module
Implementation of hook_token_values().
phptemplate_heartbeat_comment in modules/heartbeat_example/heartbeat_example.module
OVERRIDE of theme function for heartbeat comment
theme_hds_created_time_ago in modules/hds/hds.module
Formatter for the time ago created display
theme_heartbeat_time_ago in ./heartbeat.module
Theme function for the widgets of a message

File

./heartbeat.common.inc, line 212
Commonly functions used in heartbeat

Code

function _theme_time_ago($time) {
  return '<span class="activity-time">' . t('@time ago', array(
    '@time' => format_interval($_SERVER['REQUEST_TIME'] - $time, 1),
  )) . '</span>';
}