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 | |
| $entries_url = 'http://gv2.dev.codeseekah.com/wp-json/gravityview/v1/views/1696/entries.json'; | |
| $nonce = wp_create_nonce( 'wp_rest' ); | |
| ?> | |
| <script type="text/javascript"> | |
| jQuery.ajax( { | |
| url: <?php echo json_encode( $entries_url ); ?>, | |
| method: 'GET', | |
| beforeSend: function ( xhr ) { | |
| xhr.setRequestHeader( 'X-WP-Nonce', <?php echo json_encode( $nonce ); ?> ); |
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 | |
| /** | |
| * Gravity Perks // GP Unique ID // Copy ID to Another Field | |
| * http://gravitywiz.com | |
| */ | |
| // change the "999" to your form ID | |
| add_filter( 'gform_entry_post_save_999', function( $entry ) { | |
| // update "1" to your Unique ID field's field ID | |
| $uid_field_id = 1; |
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 before pasting it on your theme's functions.php | |
| add_filter( 'gravityview/entry_notes/get_notes', 'gv_modify_notes', 10, 2 ); | |
| function gv_modify_notes( $notes, $entry_id ) { | |
| foreach($notes as $key => $note){ | |
| if (strpos( $note->value, 'Approved') !== false){ | |
| $note->value = "Aprovada!"; | |
| } | |
| if (strpos( $note->value, 'Unapproved') !== false){ | |
| $note->value = "Não Aprovada!"; |
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 | |
| function gravityview_datatables_change_messages( $dt_config, $view_id, $post ) { | |
| $dt_config['language']['processing'] = 'Wait!'; | |
| //$dt_config['language']['emptyTable'] = 'No entries here!'; | |
| return $dt_config; | |
| } | |
| add_filter( 'gravityview_datatables_js_options', 'gravityview_datatables_change_messages', 10, 3 ); |
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; | |
| } |
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
| <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
| .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
| <?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
| <?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 ) { |