bp_activity_timestamp_class( string $classes = '' )

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


Parameters Parameters

$classes

(string) (Optional) Array of classes for timestamp.

Default value: ''


Top ↑

Return Return

(string) $classes


Source 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;
}


Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.