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 | |
| /** | |
| * Connect Gravity Forms Multi File Upload and Advanced Custom Fields Repeating File-Field and Gallery Field | |
| * REMEMBER: Set ID correctly for forms and fields AND set acf field names | |
| */ | |
| add_action( 'gform_after_submission_4', 'add_form_after_submission', 10, 2 ); | |
| function add_form_after_submission( $entry, $form ) { | |
| //getting post | |
| $post = get_post( $entry['post_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 | |
| /** | |
| * Create a new media library entry with a file upload on gravity form submission. | |
| * @see https://joshuadnelson.com/connect-gravity-forms-file-upload-to-acf-gallery-field/ | |
| * @author Joshua David Nelson, [email protected] | |
| */ | |
| $gravity_form_id = 1; // gravity form id, or replace {$gravity_form_id} below with this number | |
| add_filter( "gform_after_submission_{$gravity_form_id}", 'jdn_add_image_to_media_library', 10, 2 ); | |
| function jdn_add_image_to_media_library( $entry, $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 | |
| /** | |
| * Gravity Perks // GP Media Library // Auto-attach Uploaded Files to GF-generated Post | |
| * http://gravitywiz.com/documentation/gp-media-library/ | |
| */ | |
| add_action( 'gform_after_create_post', function( $post_id, $entry, $form ) { | |
| if( is_callable( 'gp_media_library' ) ) { | |
| $file_ids = gp_media_library()->get_file_ids_by_entry( $entry, $form ); | |
| if( $file_ids ) { | |
| foreach( $file_ids as $field_id => $_file_ids ) { |
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> | |
| var et_site_url = 'http://webhostingdivi.site'; | |
| var et_post_id = '193'; | |
| function et_core_page_resource_fallback(a, b) { | |
| "undefined" === typeof b && (b = a.sheet.cssRules && 0 === a.sheet.cssRules.length); | |
| b && (a.onerror = null, a.onload = null, a.href ? a.href = et_site_url + "/?et_core_page_resource=" + a.id + et_post_id : a.src && (a.src = et_site_url + "/?et_core_page_resource=" + a.id + et_post_id)) | |
| } | |
| </script> | |
| <title>Divi hosting home | Premium Divi Web Hosting</title> |
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 type="text/javascript"> | |
| jQuery( document ).ready( function( $ ) { | |
| var ms_one_day = 1000 * 60 * 60 * 24; | |
| var form_id = '1'; | |
| var date_format = 'dd-mm-yy'; | |
| var field_date_start = $( '#input_' + form_id + '_1' ); | |
| var field_date_end = $( '#input_' + form_id + '_2' ); |
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 // Nested Forms // Delay Child Notifications for Parent Payment | |
| * http://gravitywiz.com/documentation/gravity-forms-nested-forms/ | |
| */ | |
| add_filter( 'gpnf_should_send_notification', function( $should_send_notification, $notification, $context, $parent_form, $nested_form_field, $entry, $child_form ) { | |
| if( $context == 'parent' ) { | |
| $parent_entry = GFAPI::get_entry( rgar( $entry, 'gpnf_entry_parent' ) ); | |
| $should_send_notification = in_array( rgar( $parent_entry, 'payment_status' ), array( 'Paid', 'Active' ) ); |
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
| var Barcode128Svg = (function () { | |
| function Barcode128Svg(input) { | |
| this.input = input; | |
| this.factor = 2; | |
| this.height = 75; | |
| } | |
| var lookup = {}, data = "212222222122222221121223121322131222122213122312132212221213221312231212112232122132122231113222123122123221223211221132221231213212223112312131311222321122321221312212322112322211212123212321232121111323131123131321112313132113132311211313231113231311112133112331132131113123113321133121313121211331231131213113213311213131311123311321331121312113312311332111314111221411431111111224111422121124121421141122141221112214112412122114122411142112142211241211221114413111241112134111111242121142121241114212124112124211411212421112421211212141214121412121111143111341131141114113114311411113411311113141114131311141411131".split(/(\d{6})/).filter(function (s) { return !!s }); | |
| for (var i = 32; i < 127; i++) | |
| lookup[String.fromCharCode(i)] = [i - 32, data[i - 32]]; |
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
| <IfModule mod_expires.c> | |
| ExpiresActive on | |
| ExpiresDefault "access plus 1 month" | |
| # CSS | |
| ExpiresByType text/css "access plus 1 year" | |
| # Data interchange | |
| ExpiresByType application/atom+xml "access plus 1 hour" |
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 | |
| // @source: http://www.paulund.co.uk/resize-image-class-php | |
| /** | |
| * Resize image class will allow you to resize an image | |
| * | |
| * Can resize to exact size | |
| * Max width size while keep aspect ratio | |
| * Max height size while keep aspect ratio | |
| * Automatic while keep aspect ratio |