Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rafaehlers/4579f244d56e9d9f8f472e48be46fe6c to your computer and use it in GitHub Desktop.
Save rafaehlers/4579f244d56e9d9f8f472e48be46fe6c to your computer and use it in GitHub Desktop.
GravityView - Override whether the Approve/Reject Entry column is shown
<?php
/**
* Override whether the Approve/Reject Entry column is shown, per form
* Requires GravityView 1.7.2
*
* @param boolean $show_approve_column Whether the column will be shown
* @param int $form_id The ID of the Gravity Forms form for which entries are being shown
*
* @return boolean
*/
function gravityview_show_approved_entries_column( $show_approve_column, $form_id ) {
// In this example, we want to HIDE the column for Gravity Forms form ID 2
if( $form_id === 2 ) {
return false;
}
// For other forms, return the default.
return $show_approve_column;
}
add_filter('gravityview/approve_entries/show-column','gravityview_show_approved_entries_column', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment