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 | |
| // Disable auto-complete on form. | |
| add_filter( 'gform_form_tag', function( $form_tag ) { | |
| return str_replace( '>', ' autocomplete="off">', $form_tag ); | |
| }, 11 ); | |
| // Diable auto-complete on each field. | |
| add_filter( 'gform_field_content', function( $input ) { | |
| return preg_replace( '/<(input|textarea)/', '<${1} autocomplete="off" ', $input ); |
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 // Populate Anything // Populate Child Entries | |
| * | |
| * Populate child entries from a Nested Form field into any multi-choice field. | |
| * | |
| * Instructional Video: | |
| * https://www.loom.com/share/7b26b18f78624e0ca4bcd2b574636b8b | |
| * | |
| * Step 1 - Configure a Parent Entry Field |
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 // Choice Counter | |
| * | |
| * Get the total number of checkboxes checked or multi-select options selected. Useful when wanting to apply conditional | |
| * logic based on those totals. | |
| * | |
| * @version 1.0 | |
| * @author David Smith <[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 | |
| /** | |
| * Gravity Perks // Media Library // Set Upload Directory | |
| * http://gravitywiz.com/documentation/gravity-forms-media-library/ | |
| */ | |
| add_filter( 'gpml_media_data', function( $return ) { | |
| add_filter( 'upload_dir', 'gpml_set_upload_dir' ); | |
| if( ! function_exists( 'gpml_set_upload_dir' ) ) { | |
| function gpml_set_upload_dir( $upload_dir ) { | |
| $upload_dir['path'] = ABSPATH . 'wp-content/uploads/paramountregistry'; |
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
| /** | |
| * Gravity Perks // Pay Per Word // Surprise, Pay Per Character! | |
| * https://gravitywiz.com/documentation/gravity-forms-pay-per-word/ | |
| */ | |
| gform.addFilter( 'gpppw_word_count', function( wordCount, text, gwppw, ppwField, formId ) { | |
| // Pay per character instead of words. | |
| var words = text.split( '' ); | |
| return words == null ? 0 : words.length; | |
| } ); |
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 // Email Header to Identify Notification Source | |
| * | |
| * You've installed Gravity Forms on a ton of sites and now you're getting a ton of notifications. The problem is there | |
| * is no clear indicator which site is sending the notification. How frustrating! | |
| * | |
| * This simple plugin automatically adds a custom header that identifies the URL that generated the Gravity Forms notification. | |
| * This is most useful when installed as an MU plugin at the start of development on each site. | |
| * |
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 | |
| /* | |
| * Multisite for https://wordpress.org/plugins/wp-force-login/ | |
| * Allows all users of the network to view all sites and posts on the network | |
| * Intended to be used as an mu-plugin | |
| */ | |
| add_action( 'template_redirect', function() { | |
| if ( is_user_logged_in() ) { | |
| remove_action('template_redirect', 'v_forcelogin'); | |
| } |
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_submission', 'braums_after_submission', 10, 2 ); | |
| function braums_after_submission( $entry, $form ) { | |
| ?> | |
| <script> | |
| function braums_datalayer_push() { | |
| var form_submission = sessionStorage.getItem('entry_<?php echo absint( $entry[ 'id' ] ); ?>'); | |
| if ( null == form_submission ) { | |
| if ( typeof( dataLayer ) != 'undefined' ) { | |
| dataLayer.push({'event': 'BWTrackEvent', |
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 | |
| public function init() { | |
| add_action( 'add_meta_boxes', array( &$this, 'register_meta_boxes' ) ); | |
| $labels = array( | |
| 'name' => 'Galleries', | |
| 'singular_name' => 'Gallery', | |
| 'menu_name' => 'Galleries', | |
| 'name_admin_bar' => 'Galleries', | |
| 'add_new' => 'Add New', | |
| 'add_new_item' => 'Add New Gallery', |