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/field/notes/email_content', 'gv_modify_notes_email_content', 10, 4 ); | |
| function gv_modify_notes_email_content( $email_settings ) { | |
| extract( $email_settings ); | |
| $email_settings['from'] = '[email protected]'; | |
| $email_settings['from_name'] = 'GravityView Website'; | |
| /* | |
| $email_settings['to'] = $to; //[email protected] | |
| $email_settings['bcc'] $bcc; //[email protected] | 
  
    
      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_az_entry_filter_localization', 'add_polish_gravityview_az_entry_filter_localization' ); | |
| function add_polish_gravityview_az_entry_filter_localization( $languages = array() ) { | |
| $languages['pl_PL'] = __( 'Polish', 'gravityview-az-filters' ); | |
| return $languages; | |
| } | |
| add_filter( 'gravityview_alphabets', 'add_polish_alphabet' ); | |
| function add_polish_alphabet( $alphabet = array() ) { | 
  
    
      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 // Don't copy this line | |
| add_filter( 'gravityview_datatables_js_options', 'disable_gravityview_datatables_search', 11, 3 ); | |
| function disable_gravityview_datatables_search( $dt_config, $view_id, $post ) { | |
| $return_config = $dt_config; | |
| if( $view_id == '81' ) { // change "81" to your View ID | |
| $return_config['searching'] = false; | |
| } | |
| return $return_config; | |
| } | 
  
    
      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 inside a Custom Content field on a View: [gv_math_percentage field="{field Merge tag here:x}"] | |
| add_shortcode("gv_math_percentage", "gv_math_custom_shortcode"); | |
| function gv_math_custom_shortcode( $atts ){ | |
| extract( shortcode_atts( | |
| array( | |
| 'field' => '', | |
| ), $atts ) | 
  
    
      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 //don't copy this line | |
| add_filter( 'gravityview/template/text/no_entries', 'modify_gravityview_no_entries_text', 10, 3 ); | |
| function modify_gravityview_no_entries_text( $existing_text, $is_search = false, $context = null ) { | |
| $return = $existing_text; | |
| $view_id = $context->view->ID; | |
| if( $view_id == 3683 ) { // CHANGE TO THE VIEW ID YOU WANT TO TARGET | |
| $return = 'View empty'; | |
| } | |
| return $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 // don't copy this line | |
| add_filter( 'gettext', 'gv_modify_text', 20, 3 ); | |
| function gv_modify_text( $translated_text, $text, $domain ) { | |
| if ( $translated_text === 'You do not have permission to edit this entry.') { | |
| $translated_text = __( 'You dont!', 'gravityview' ); | |
| } | 
  
    
      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 // don't copy this line | |
| add_action( 'wp_enqueue_scripts', 'gv_dequeue_main_css', 30 ); | |
| add_action( 'wp_print_scripts', 'gv_dequeue_main_css', 2 ); | |
| function gv_dequeue_main_css() { | |
| wp_dequeue_style( 'gravityview_default_style' ); | |
| wp_dequeue_style( 'gravityview_style_default_table' ); | |
| wp_dequeue_style( 'gravityview_style_default_list' ); | 
  
    
      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 | |
| function gv_search_operator( $operator, $filter = array(), $context = null ){ | |
| return 'is'; | |
| } | |
| add_filter( 'gravityview_search_operator', 'gv_search_operator'); | |
| // This disallows empty field values (It must be used in conjunction with the filter above) | |
| add_filter( 'gravityview/search/ignore-empty-values', function() { | |
| return false; | 
  
    
      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 // DON'T COPY THIS LINE | |
| //add_action('gravityview/approve_entries/disapproved','gv_trigger_form_feed_on_approval'); | |
| add_action('gravityview/approve_entries/approved','gv_trigger_form_feed_on_approval'); | |
| function gv_send_form_notification_approval($entry_id = 0){ | |
| $entry = GFAPI::get_entry( $entry_id ); | |
| if( ! $entry || is_wp_error( $entry ) ) { | |
| return; | |
| } | |
| $form = GFAPI::get_form( $entry['form_id'] ); | 
  
    
      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 // Make sure to remove this line | |
| add_filter('gravityview/datatables/button_print','gravityview_dtbuttons_print_title', 10 ,2); | |
| function gravityview_dtbuttons_print_title( $button_config = array(), $view_id){ | |
| $button_config['title'] = 'Add your own title here'; | |
| return $button_config; | |
| } |