View gv-rest-api-nonce.php
This file contains 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 = 'https://try.gravityview.co/demo/wp-json/gravityview/v1/views/148/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 ); ?> ); |
View gv-calendar-remove-time-display.php
This file contains 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 | |
/** | |
* Remove the time from being displayed on a GravityView calendar | |
* | |
* @see https://docs.gravityview.co/category/647-calendar | |
* | |
* @param array $calendar_options Array of FullCalendar options | |
* | |
* @return mixed |
View maps-coordinates.php
This file contains 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 | |
/** | |
* Use the coordinates (Latitude, Longitude) instead of the address to position the markers over the Maps | |
* | |
* Replace 'MY_LATITUDE_FIELD_ID', 'MY_LONGITUDE_FIELD_ID' with field ids containing the latitude and longitude values | |
* | |
* @param array $fields_array Gravity Forms fields IDs containing the latitude and longitude | |
* @param GravityView_View $gravityview_view Current View object | |
* | |
* @return array Array with field IDs of latitude and longitude fields (Example: [ 5, 6 ] ). Empty array if not the form we want to override. |
View gv-change-back-link.php
This file contains 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_action( 'gravityview/template/links/back/url', 'gv_change_back_link', 10, 2 ); | |
/** | |
* Modify the back link URL for a specific View | |
* | |
* @param string $href The original back link | |
* @param \GV\Template_Context The current context | |
* |
View gv_age.php
This file contains 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_shortcode( 'gv_age', 'gv_calculate_age' ); | |
/** | |
* Calculate age in years based on entry data | |
* | |
* Usage inside a Custom Content field (Replace "2" with the ID of the date field): | |
* | |
* <code> |
View add-gf-to-admin-dashboard.php
This file contains 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_action( 'wp_dashboard_setup', 'add_gf_to_dashboard_setup' ); | |
function add_gf_to_dashboard_setup() { | |
wp_add_dashboard_widget( 'wp_gf_dashboard', 'My Gravity Form', 'add_gf_to_dashboard' ); | |
} | |
function add_gf_to_dashboard() { | |
View gv-checkbox-bug-filter.php
This file contains 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_entries', function( $entries, $criteria, $passed_criteria, &$total ) { | |
$view_id = GravityView_frontend::getInstance()->get_context_view_id(); | |
if ( $view_id != 97 /** Augmented View ID here */ ) { | |
return $entries; | |
} | |
$_subtract = $criteria; |
View gv-checkbox-bug-filter.php
This file contains 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_entries', function( $entries, $criteria, $passed_criteria, &$total ) { | |
$view_id = GravityView_frontend::getInstance()->get_context_view_id(); | |
if ( $view_id != 97 /** Augmented View ID here */ ) { | |
return $entries; | |
} | |
$_subtract = $criteria; |
View gv_modify_notes_email_content.php
This file contains 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/field/notes/email_content', 'gv_modify_notes_email_content', 10, 4 ); | |
/** | |
* Modify the values passed when sending a note email | |
* @see GVCommon::send_email | |
* @since 1.17 | |
* @param array $email_settings Values being passed to the GVCommon::send_email() method: 'from', 'to', 'bcc', 'reply_to', 'subject', 'message', 'from_name', 'message_format', 'entry', 'email_footer' | |
* | |
* @return array $email_settings |
View gv_modify_notes_email_content.php
This file contains 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_action( 'plugins_loaded', function() { | |
add_filter( 'gravityview/field/notes/email_content', 'gv_modify_notes_email_content', 10, 4 ); | |
}, 20 ); | |
/** | |
* Modify the email content | |
* | |
* @param array $email_settings |
NewerOlder