Esempio n. 1
0
/**
 * Retrieve the last time activity was updated.
 *
 * @since BuddyPress (1.0.0)
 *
 * @uses BP_Activity_Activity::get_last_updated() {@link BP_Activity_Activity}
 * @uses apply_filters() To call the 'bp_activity_get_last_updated' hook.
 *
 * @return string Date last updated.
 */
function bp_activity_get_last_updated()
{
    return apply_filters('bp_activity_get_last_updated', BP_Activity_Activity::get_last_updated());
}
/**
 * Retrieve the last time activity was updated.
 *
 * @since 1.0.0
 *
 * @uses BP_Activity_Activity::get_last_updated() {@link BP_Activity_Activity}
 * @uses apply_filters() To call the 'bp_activity_get_last_updated' hook.
 *
 * @return string Date last updated.
 */
function bp_activity_get_last_updated()
{
    /**
     * Filters the value for the last updated time for an activity item.
     *
     * @since 1.1.0
     *
     * @param BP_Activity_Activity $last_updated Date last updated.
     */
    return apply_filters('bp_activity_get_last_updated', BP_Activity_Activity::get_last_updated());
}
 /**
  * @group get_last_updated
  */
 public function test_get_last_updated()
 {
     $now = time();
     $a1 = $this->factory->activity->create(array('recorded_time' => date('Y-m-d H:i:s', $now - 500)));
     $a2 = $this->factory->activity->create(array('recorded_time' => date('Y-m-d H:i:s', $now - 100)));
     $a3 = $this->factory->activity->create(array('recorded_time' => date('Y-m-d H:i:s', $now - 300)));
     $this->assertSame(date('Y-m-d H:i:s', $now - 100), BP_Activity_Activity::get_last_updated());
 }
Esempio n. 4
0
function bp_activity_get_last_updated()
{
    return BP_Activity_Activity::get_last_updated();
}