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 | |
| <?php | |
| /** | |
| * Gravity Perks // Populate Anything // Recteurs d'Académie JSON | |
| */ | |
| class GPPA_Object_Type_Recteurs extends GPPA_Object_Type { | |
| public function __construct( $id ) { | |
| parent::__construct( $id ); |
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 Wiz // Gravity Forms // Calculation Subtotal Merge Tag | |
| * https://gravitywiz.com/subtotal-merge-tag-for-calculations/ | |
| * | |
| * Adds a {subtotal} merge tag which calculates the subtotal of the form. | |
| * | |
| * This merge tag can only be used within the "Formula" setting of Calculation-enabled fields (i.e. Number, Calculated Product). | |
| * | |
| * Plugin Name: Gravity Forms Subtotal Merge Tag |
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 | |
| add_filter( 'gform_pre_render', function ( $form, $ajax, $field_values ) { | |
| if ( ! session_id() ) { | |
| session_start(); | |
| } | |
| if ( ! isset( $_SESSION['gwreadonly_disabled_fields'] ) ) { | |
| $_SESSION['gwreadonly_disabled_fields'] = array(); | |
| } | |
| $gwreadonly_disabled_fields = $_SESSION['gwreadonly_disabled_fields']; |
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 Wiz // Gravity Forms // Update Posts | |
| * https://gravitywiz.com/how-to-update-posts-with-gravity-forms/ | |
| * | |
| * Update existing post title, content, author and custom fields with values from Gravity Forms. | |
| * | |
| * @version 0.6 | |
| * @author Scott Ryer <[email protected]> | |
| * @license GPL-2.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 | |
| add_action( 'gform_after_update_entry', function ( $form, $entry_id ) { | |
| $gppa_lmt = GP_Populate_Anything_Live_Merge_Tags::get_instance(); | |
| $entry = GFAPI::get_entry( $entry_id ); | |
| foreach ( $form['fields'] as $field ) { | |
| // For any field having Live Merge Tags. | |
| if ( $gppa_lmt->has_live_merge_tag( $field->defaultValue ) ) { | |
| $gppa_lmt->populate_lmt_whitelist( $form ); | |
| remove_all_filters('gform_pre_replace_merge_tags'); |
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 // Unique ID // Conditional Unique ID for Gravity Flow | |
| * https://gravitywiz.com/documentation/gravity-forms-unique-id/ | |
| * | |
| * Instruction Video: https://www.loom.com/share/e799e8b4b0984d99a66da79faa34ffee | |
| * | |
| * Prevent a Unique ID field from generating its value until a specific Gravity Flow Workflow step is completed. | |
| * Useful when you want to generate the Unique ID only after approval or other workflow steps. | |
| * |
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 | |
| class GW_Rename_Uploaded_Files { | |
| public $_args; | |
| public function __construct( $args = array() ) { | |
| // set our default arguments, parse against the provided arguments, and store for use throughout the class | |
| $this->_args = wp_parse_args( $args, array( | |
| 'form_id' => false, |
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 | |
| class GPPA_Populate_Child_Entries { | |
| public function __construct( $args = array() ) { | |
| // do version check in the init to make sure if GF is going to be loaded, it is already loaded | |
| add_action( 'init', array( $this, 'init' ) ); | |
| } |
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 | |
| add_filter( 'gform_pre_render', 'gpeb_remove_fields_on_edit' ); | |
| add_filter( 'gform_pre_process', 'gpeb_remove_fields_on_edit' ); | |
| function gpeb_remove_fields_on_edit( $form ) { | |
| $is_block = (bool) rgpost( 'gpeb_entry_id' ); | |
| if ( ! $is_block ) { | |
| $is_block = class_exists( 'WP_Block_Supports' ) && rgar( WP_Block_Supports::$block_to_render, 'blockName' ) === 'gp-entry-blocks/edit-form'; |
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 | |
| add_filter( 'gform_field_content', function( $content, $field, $value, $lead_form_id ) { | |
| if ( ! rgget( 'edit' ) || ! rgget( 'gvid' ) ) { | |
| return $content; | |
| } | |
| libxml_use_internal_errors( true ); | |
| $doc = new DOMDocument(); | |
| $doc->loadHTML( '<?xml encoding="utf-8" ?>' . $content ); |
NewerOlder