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 | |
/** | |
* Sort forms in Gravity Forms block in alphabetical order. | |
* | |
* @param array $forms A collection of active forms on site. | |
*/ | |
add_filter( 'gform_block_form_forms', function( $forms ) { | |
usort( $forms, function( $a, $b ) { |
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 | |
// Change the priority for Fillable PDFs. | |
remove_filter( 'gform_entry_post_save', array( fg_fillablepdfs(), 'maybe_process_feed' ), 10 ); | |
add_filter( 'gform_entry_post_save', array( fg_fillablepdfs(), 'maybe_process_feed' ), 99, 2 ); | |
/** | |
* Embed generated QR Code into PDF field. | |
* | |
* @param array $pdf_meta PDF arguments. |
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 | |
/** | |
* Gravity Wiz // Gravity Forms // Custom Javascript | |
* | |
* Include custom Javascript with your form. | |
* | |
* @version 1.0 | |
* @author David Smith <david@gravitywiz.com> | |
* @license GPL-2.0+ | |
* @link http://gravitywiz.com/ |
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( 'fg_fillable_pdf_args', 'add_list_field_to_pdf', 10, 4 ); | |
function add_list_field_to_pdf( $pdf_meta, $feed, $entry, $form ) { | |
// Prepare column names for each day of the week. | |
$column_names = array( | |
'Sunday %d', | |
'Monday %d', |
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( 'fg_entryautomation_export_email_message', 'add_payment_summary', 10, 4 ); | |
function add_payment_summary( $message, $settings, $form, $file_name ) { | |
// Get search criteria. | |
$search_criteria = fg_entryautomation()->get_search_criteria( $settings, $form ); | |
// Get entries for search criteria. |
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( 'fg_entryautomation_export_email_headers', 'add_export_bcc_address', 10, 3 ); | |
/** | |
* Add BCC header to Entry Automation export email. | |
* | |
* @param array $headers Email headers. | |
* @param array $task Entry Automation Task meta. | |
* @param string $file_path Export file path. |
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( 'fg_entryautomation_after_export', 'fg_entryautomation_remove_header_row', 10, 3 ); | |
/** | |
* Remove header line from generated CSV export file. | |
* | |
* @param array $task The current Entry Automation task's settings. | |
* @param array $form The current Form object. | |
* @param string $file_path File path of export file. |
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( 'fg_entryautomation_export_email_subject', 'subject_date_range', 10, 4 ); | |
function subject_date_range( $subject, $settings, $form, $file_name ) { | |
// Get search criteria. | |
$search_criteria = fg_entryautomation()->get_search_criteria( $settings, $form ); | |
// Add date range to subject. |
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( 'fg_entryautomation_maximum_attachment_size', 'increase_attachment_size', 10, 4 ); | |
function increase_attachment_size( $maximum_file_size, $settings, $form, $file_name ) { | |
return 10485760; | |
} |
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( 'fg_entryautomation_search_criteria', 'only_automate_failed_payments', 10, 3 ); | |
function only_automate_failed_payments( $search_criteria, $feed, $form ) { | |
$search_criteria['field_filters'][] = array( 'key' => 'payment_status', 'value' => 'Failed' ); | |
return $search_criteria; | |
NewerOlder