Created
          June 10, 2022 20:41 
        
      - 
      
- 
        Save rafaehlers/b0984524f599bdb25ba96bb5719a07d9 to your computer and use it in GitHub Desktop. 
    Highlight an entire row if entry was created by currently logged-in user
  
        
  
    
      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_filter( 'gravityview/template/table/entry/class', function( $class, $context ) { | |
| if ( ! is_user_logged_in() ) { | |
| return $class; | |
| } | |
| $view_id = $context->view->ID; | |
| $current_user_id = get_current_user_id(); | |
| if($view_id == 25){ | |
| if ( $context->entry['created_by'] == $current_user_id ) { | |
| $class .= ' currentuser'; | |
| } | |
| } | |
| return $class; | |
| }, 10, 2 ); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment