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 //Remove this line | |
| add_filter( 'et_grab_image_setting', function( $default ) { | |
| if ( gravityview()->request->is_view() ) return false; | |
| return $default; | |
| } ); |
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/fields/fileupload/image_atts', function ( $image_atts ) { | |
| $image_atts['width'] = NULL; | |
| return $image_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 //MAKE SURE TO REMOVE THIS WHOLE LINE FIRST | |
| 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 ) { | |
| $view_id = $context->view->ID; | |
| if($view_id == 8) //Change this number to your View ID | |
| { | |
| if( $is_search ) { |
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 WHOLE LINE FIRST, BEFORE COPYING THIS CODE TO YOUR THEME's FUNCTIONS.PHP FILE | |
| add_action( 'gravityview/view/query', function( &$query, $view, $request ) { | |
| $q = $query->_introspect(); | |
| foreach ( $q['joins'] as $join ) { | |
| // Filter to active entries only | |
| $condition = new \GF_Query_Condition( | |
| new \GF_Query_Column( 'status', $join[0]->source ), | |
| \GF_Query_Condition::EQ, |
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 FIRST LINE WHEN COPYING THIS to your THEME'S FUNCTIONS.PHP FILE | |
| add_filter( 'gravityview_fe_search_criteria', 'gv_exact_match_fields', 10, 2 ); | |
| /** | |
| * @param array $search_criteria | |
| * @param int $form_id | |
| * | |
| * @return array Modified search, if it's the current form | |
| */ | |
| function gv_exact_match_fields( $search_criteria = array(), $form_id = 0 ) { |
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 // REMOVE THIS LINE BEFORE COPYING THIS CODE TO YOUR FUNCTIONS.PHP FILE | |
| add_filter( 'gravityview/entry_notes/get_notes', 'gv_remove_entry_approval_notes', 10, 2 ); | |
| function gv_remove_entry_approval_notes( $notes, $entry_id ) { | |
| foreach($notes as $key => $note){ | |
| if (strpos( $note->value, 'pproved') !== false){ | |
| unset( $notes[ $key] ); | |
| } | |
| if (strpos( $note->value, 'WordPress') !== false){ | |
| unset( $notes[ $key] ); |
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
| .gv-table-view thead { | |
| display: none; | |
| } | |
| .gv-table-view tr { | |
| display: block; | |
| position: relative; | |
| padding: 1.2em 0; | |
| overflow-x: auto; | |
| } |
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
| <script type="text/javascript"> | |
| (function($){ | |
| $(document).ready(function(){ | |
| $("form.gv-widget-search :input").each(function(index, elem) { | |
| var eId = $(elem).attr("id"); | |
| var label = null; | |
| if (eId && (label = $(elem).parents("form").find("label[for="+eId+"]")).length == 1) { | |
| $(elem).attr("placeholder", $(label).html()); | |
| $(label).remove(); |
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 to your functions.php file! | |
| add_filter( 'gpls_rule_groups', function( $rule_groups, $form_id ) { | |
| // Update "123" to the ID of your form. | |
| $primary_form_id = 123; | |
| if( $form_id == $primary_form_id ) { | |
| return $rule_groups; | |
| } | |
| if(( $form_id == 4 ) || ( $form_id == 5 ) || ( $form_id == 6 ) || ( $form_id == 7 )) { | |
| return $rule_groups; |
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 FIRST LINE BEFORE COPYING THIS CODE TO YOUR FUNCTIONS.PHP FILE | |
| add_filter('gravityview/datatables/button_excel','gravityview_excel_export_settings', 10 ,2); | |
| function gravityview_excel_export_settings( $button_config = array(), $view_id){ | |
| $button_config['filename'] = 'dt-excel-test'; //you can change the filename here (don't type the extension) | |
| $button_config['title'] = ''; | |
| return $button_config; | |
| } |