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 <david@gravitywiz.com> | |
| * @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', |
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_form_post_get_meta', __NAMESPACE__ . '\\enforce_gravity_forms_anti_spam_honeypot' ); | |
| /** | |
| * Enforce anti-spam honeypot on all Gravity forms. | |
| * | |
| * @param array $form The current form to be filtered. | |
| * | |
| * @return array | |
| */ |
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
| <script> | |
| (function( $ ) { | |
| $( '.et_pb_toggle' ).hover(function() { | |
| $( this ).children( 'h5' ).trigger( 'click' ); | |
| }); | |
| })( jQuery ); | |
| </script> |
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
| # | |
| # Required: Py3+, pip maildir2mbox | |
| # Cpanel dovecot maildir to mbox converting on windows | |
| $table = Get-ChildItem -Path "PATH TO MAILDIR ROOT" -Recurse -Directory -Include .* -Force -ErrorAction SilentlyContinue | Select-Object FullName, Name | |
| foreach ($row in $table) | |
| { | |
| # Assuming that you want to dump it on C drive each folder as its own MBOX file | |
| python -m maildir2mbox $($row.FullName) "C:\$($row.Name.substring(1)).mbox" | |
| } |