Last active
          May 12, 2021 20:25 
        
      - 
      
- 
        Save rafaehlers/076c1a18bcc4e536971d2a2813725665 to your computer and use it in GitHub Desktop. 
    Highlight an entire row if entry is approved
  
        
  
    
      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 | |
| // https://github.com/gravityview/GravityView/issues/1315 | |
| add_filter( 'gravityview/template/table/entry/class', function( $class, $context ) { | |
| $view_id = $context->view->ID; | |
| if($view_id == 8){ | |
| if ( $context->entry['is_approved'] == 1 ) { | |
| $class .= ' highlight'; // If this entry is approved then add the highlight class | |
| } | |
| } | |
| return $class; | |
| }, 10, 2 ); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment