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/edit_entry/after_update', 'gravityview_trigger_paypal_feeds', 10, 3 ); | |
| function gravityview_trigger_paypal_feeds( $form = array(), $entry_id = array(), $object ) { | |
| if ( 100 !== (int) $form['id'] ) { // replace 100 with your form ID | |
| return; | |
| } | |
  
    
      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 | |
| add_filter('gravityview/fields/fileupload/files_array', 'gv_modify_files_output_pdf',10,1); | |
| function gv_modify_files_output_pdf($output_arr){ | |
| foreach ($output_arr as $key => $value) { | |
| $pdf_exists = strpos($value['file_path'], '.pdf'); | |
| if ($pdf_exists !== false) { | |
| $gf_download = strpos($value['file_path'],'?gf-download='); | |
| if ($gf_download == false) { | |
| $gravity_forms = strpos($value['file_path'],'/gravity_forms/'); | 
  
    
      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 | |
| add_filter( 'gv_ratings_reviews_review_form_settings', 'gv_modify_review_form_labels',10,1); | |
| function gv_modify_review_form_labels($defaults){ | |
| $view_id = GravityView_View::getInstance()->getViewId(); | |
| if($view_id == 30){ | |
| $new_defaults = array( | |
| 'title_reply' => 'Review Team Member', | |
| ); | 
  
    
      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_search_widget_fields_before', 'gv_modify_search_fields', 10); | |
| function gv_modify_search_fields( $search_obj ){ | |
| foreach( $search_obj->search_fields as $key => &$search_field ) { | |
| if ( $search_field['type'] === 'select' ){ | |
| foreach ( $search_field['choices'] as $key => $value ){ | 
  
    
      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 | |
| /** | |
| * Modify event array that is output to FullCalendar | |
| * In this sample code, we add a background color to a specific event | |
| * | |
| * @param array $events Array of events. | |
| * @param object $form Calendar form. | |
| * @param object $feed Calendar feed. | |
| * @param array $field_map Array of feed fields mapped to calendar settings (e.g., start_time, end_time). | |
| * @param array $entries Array of entries being displayed in the calendar (Requires 1.5.2) | 
  
    
      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 | |
| //USAGE: [gv_expiration date="2" duration="+1 year"] | |
| // 2 is the field ID of the date field | |
| // If original date is "2021-04-01" it will output "2022-04-01" | |
| // https://docs.gravityview.co/article/79-using-relative-start-dates-and-end-dates | |
| add_shortcode( 'gv_expiration', 'gv_expiration' ); | |
| function gv_expiration( $atts ) { | |
| global $gravityview_view; | 
  
    
      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/edit_entry/after_update', 'gravityview_trigger_feeds', 10, 3 ); | |
| function gravityview_trigger_feeds( $form = array(), $entry_id = array(), $object ) { | |
| if ( 100 !== (int) $form['id'] ) { // replace 100 with your form ID | |
| return; | |
| } | |
  
    
      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/edit_entry/after_update', 'gravityview_trigger_webhooks_feed', 10, 3 ); | |
| function gravityview_trigger_webhooks_feed( $form = array(), $entry_id = array(), $object ) { | |
| if ( 100 !== (int) $form['id'] ) { // replace 100 with your form ID | |
| return; | |
| } | 
  
    
      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/edit_entry/after_update', 'gravityview_trigger_zapier_feed', 10, 3 ); | |
| function gravityview_trigger_zapier_feed( $form = array(), $entry_id = array(), $object ) { | |
| if ( 100 !== (int) $form['id'] ) { // replace 100 with your form ID | |
| return; | |
| } | 
  
    
      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 ) { | |
| $view_id = $context->view->ID; | |
| if($view_id == 46){ // Modify to target only View with specific ID (46 in this case) | |
| if ( $context->entry[1] == '1' ) { | |
| $class .= ' highlight-yes'; // If field ID 1's value is equal to 1 then add the CSS class |