gravityflow_entry_detail_content_before

Description

The gravityflow_entry_detail_content_before action allows custom code/content to be displayed before the primary form elements on the entry details page.

Parameters

ParameterTypeDetails
$formFormThe current form.
$entryEntryThe entry currently being displayed.

Examples

Display Timeline before actionable step form

If reviewing the timeline of activities that have been performed on an entry workflow before completing the current step is important, the following snippet would allow you to have the timeline present above the form. If you are using the shortcode for presentation on a page, you would likely want to add the timeline=false parameter so it is not shown at the bottom as well. Your theme may require some CSS tweaks to have it display all titles and elements properly.

add_action( 'gravityflow_entry_detail_content_before', 'jo_timeline_before', 10, 2 );
function jo_timeline_before(  $form, $entry ) {
    Gravity_Flow_Entry_Detail::maybe_show_timeline( $entry, $form, true );
}

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?