View gv_claim_entry_by_user_data.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 | |
add_filter('gravityview/edit_entry/user_can_edit_entry', 'gv_claim_entry_by_user_data', 20, 3 ); | |
/** | |
* Modify whether the currently logged-in user can edit an entry that was not created by him | |
* | |
* @param boolean $user_can_edit Can the current user edit the current entry? (Default: false) | |
* @param array $entry Gravity Forms entry array | |
* @param int $view_id ID of the view you want to check visibility against {@since 1.15} | |
* |
View gv-highlight-row-field.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 | |
add_filter( 'gravityview/template/table/entry/class', function( $class, $context ) { | |
if ( ! is_user_logged_in() ) { | |
return $class; | |
} | |
$view_id = $context->view->ID; | |
$current_user_id = get_current_user_id(); |
View gv_approval_timestamp.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 | |
add_action( 'gravityview/approve_entries/updated', 'gv_approval_timestamp', 10, 2 ); | |
function gv_approval_timestamp($entry_id, $status){ | |
if( !class_exists( 'GFAPI' ) ) { | |
gravityview()->log->error( 'GFAPI does not exist' ); | |
return false; | |
} |
View gfexcel-add-title.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 LINE | |
add_filter('gfexcel_renderer_matrix', static function (array $rows) { | |
// Make up the title | |
$title = 'text'; | |
// Wrap in array to become a row. | |
$title = [$title]; | |
array_unshift($rows, $title); |
View gv-remove-lightbox-pdf.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/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/'); |
View gv-remove-other-from-search-bar-dropdowns.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 | |
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 ){ |
View gf-calendar-events.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 | |
/** | |
* 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) |
View gv-expiration.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 | |
//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; |
View gravityview_trigger_all_form_feeds.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 | |
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; | |
} | |
View gravityview_trigger_webhooks_feed.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 | |
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; | |
} |
NewerOlder