gravityflow_timeline_note_add

The gravityflow_timeline_note_add filter allows customization of the timeline note before it is added to the database.

Parameters

Parameter Type Definition
$note String The message to be added to the timeline.
$entry_id integer The current entry id.
$user_id boolean|integer The ID of user performing the action or false (if system generated).
$user_name string The username performing the action.
$step bool|Gravity_Flow_Step If it is a step based action the current step.

Examples

Example 1 - Add the Step ID to the timeline message for any step-based updates.

add_filter( 'gravityflow_timeline_note_add', 'jo_timeline_note_customize', 10, 5 );
function jo_timeline_note_customize( $note, $entry_id, $user_id, $user_name, $step ) {
    if ( $step ) {
        $note = 'Step ID #' . $step->get_id() . ' - ' . $note;
    }

    return $note;<br>}

Placement

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