Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/10/2016 12:55:49 PM (9 years ago)
Author:
djpaul
Message:

Fix inaccurate timestamps caused by page caching.

If any template with a timestamp is statically cached, then the timestamps quickly become inaccurate.
The change adds livestamp.js and moment.js to dynamically update timestamps with the real relative time.

A consequence is that the labels surrounding the timestamps, notably in our widgets, have slightly changed.
We're going to keep an eye on this for the remainder of the 2.7 development cycle, and may make further adjustments as testing proves necessary.

Fixes #5757

Props r-a-y, imath, DJPaul

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-filters.php

    r10958 r11008  
    208208
    209209    $activity_allowedtags = $allowedtags;
    210     $activity_allowedtags['a']['class']    = array();
    211     $activity_allowedtags['a']['id']       = array();
    212     $activity_allowedtags['a']['rel']      = array();
    213     $activity_allowedtags['a']['title']    = array();
    214     $activity_allowedtags['b']             = array();
    215     $activity_allowedtags['code']          = array();
    216     $activity_allowedtags['i']             = array();
     210    $activity_allowedtags['a']['class'] = array();
     211    $activity_allowedtags['a']['id']    = array();
     212    $activity_allowedtags['a']['rel']   = array();
     213    $activity_allowedtags['a']['title'] = array();
     214
     215    $activity_allowedtags['b']    = array();
     216    $activity_allowedtags['code'] = array();
     217    $activity_allowedtags['i']    = array();
     218
    217219    $activity_allowedtags['img']           = array();
    218220    $activity_allowedtags['img']['src']    = array();
     
    223225    $activity_allowedtags['img']['id']     = array();
    224226    $activity_allowedtags['img']['title']  = array();
    225     $activity_allowedtags['span']          = array();
    226     $activity_allowedtags['span']['class'] = array();
     227
     228    $activity_allowedtags['span']                   = array();
     229    $activity_allowedtags['span']['class']          = array();
     230    $activity_allowedtags['span']['data-livestamp'] = array();
    227231
    228232
Note: See TracChangeset for help on using the changeset viewer.