gravityflow_workflow_detail_sidebar

Description

The gravityflow_workflow_detail_sidebar action is used to present custom panels in the sidebar between the workflow info and admin panels (assuming the current user has role/permissions to see the admin panel.

Parameters

ParameterTypeDetails
$formForm  The form which created this entry
$entryEntry The entry currently being displayed
$stepStep  The current step for this entry
$args ArrayThe properties for the page currently being displayed

Examples

Add a custom side panel

A non-functional panel with the same styling as the rest of the sidebar panels displayed on the entry details page via Block or Shortcode.

add_action( 'gravityflow_workflow_detail_sidebar', 'sh_gravityflow_custom_sidebar_box', 10, 4 );
function sh_gravityflow_custom_sidebar_box( $form, $entry, $current_step, $args ) {
    ?>
    <div class="postbox">
        <h3 class="hndle" style="cursor:default;">
            <span><?php esc_html_e( 'Custom Sidebar Panel', 'gravityflow' ); ?></span>
        </h3>

        <div id="submitcomment" class="submitbox">
            <div id="minor-publishing" style="padding:10px;">
                <p>Your panel functionality would go here</p>
            </div>
        </div>
    </div>
    <?php 
}

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?