gravityflow_timeline_notes

The gravityflow_timeline_notes filter allows you to customize the entries of the activity log for a given entry/workflow, before they are presented in multiple locations including the entry detail screen and {workflow_timeline} merge tag.

Parameters

Parameter Type Definition
$notes Array The array of timeline notes in reverse chronologicalentry array.
$entry Array The current entry array.

Examples

Example 1 - Display in chronological order

This will sort the timeline entries in chronological order (oldest = first).

add_filter( 'gravityflow_timeline_notes', 'jo_timeline_reverse', 10, 2 );
function jo_timeline_reverse( $notes, $entry ) {
    $notes = array_reverse( $notes );
    return $notes;
}

Placement

This code should be placed in the functions.php file of your active theme or in a custom functions plugin.