Created
          June 11, 2020 01:53 
        
      - 
      
- 
        Save rafaehlers/4579f244d56e9d9f8f472e48be46fe6c to your computer and use it in GitHub Desktop. 
    GravityView - Override whether the Approve/Reject Entry column is shown
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?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