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
Parameter | Type | Details |
---|---|---|
$form | Form | The form which created this entry |
$entry | Entry | The entry currently being displayed |
$step | Step | The current step for this entry |
$args | Array | The 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?