bp_activity_timestamp_class( string $classes = '' )

Check if Activity Heartbeat feature i on to add a timestamp class.

Description

Parameters

$classes

(Optional) Array of classes for timestamp.

Default value: ''

Return

(string) $classes

Source

File: bp-activity/bp-activity-filters.php

function bp_activity_timestamp_class( $classes = '' ) {

	if ( ! bp_activity_do_heartbeat() ) {
		return $classes;
	}

	$activity_date = bp_get_activity_date_recorded();

	if ( empty( $activity_date ) ) {
		return $classes;
	}

	$classes .= ' date-recorded-' . strtotime( $activity_date );

	return $classes;
}

Changelog

Changelog
Version Description
BuddyPress 2.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.