Exemplo n.º 1
0
function bp_get_link_last_active($link = false)
{
    global $links_template;
    if (!$link) {
        $link =& $links_template->link;
    }
    $last_active = bp_links_get_linkmeta($link->id, 'last_activity');
    if (empty($last_active)) {
        return __('not yet active', 'buddypress-links');
    } else {
        return apply_filters('bp_get_link_last_active', bp_core_time_since($last_active));
    }
}
Exemplo n.º 2
0
 function populate_meta()
 {
     // must have an id!
     if ($this->id) {
         // load meta data keys and values with one call
         $this->meta_data = bp_links_get_linkmeta($this->id);
     }
 }