Created
          February 28, 2023 18:16 
        
      - 
      
- 
        Save rafaehlers/7b61f2fd30c9069dc21ea96165bec1a4 to your computer and use it in GitHub Desktop. 
    GravityView filters for entry approval
  
        
  
    
      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 // DO NOT COPY THIS LINE | |
| add_action( 'gravityview/approve_entries/disapproved', 'gv_custom_function',10,1); | |
| add_action( 'gravityview/approve_entries/unapproved', 'gv_custom_function',10,1); | |
| add_action( 'gravityview/approve_entries/updated', 'gv_custom_function',10,1); | |
| add_action( 'gravityview/approve_entries/approved', 'gv_custom_function',10,1); | |
| function gv_custom_function($entry_id){ | |
| $entry = GFAPI::get_entry( $entry_id ); | |
| $form = GFAPI::get_form( $entry['form_id'] ); | |
| if ( 100 !== (int) $form['id'] ) { // replace 100 with your form ID | |
| return; | |
| } | |
| // YOUR CODE HERE | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment