From dcb3dc88577e7ae4aa1f5c9708e93250055970a7 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 09:56:24 -0600 Subject: [PATCH 01/82] Tooling: Added experimental snippet migration script. --- migrate-experimental.mjs | 356 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 356 insertions(+) create mode 100755 migrate-experimental.mjs diff --git a/migrate-experimental.mjs b/migrate-experimental.mjs new file mode 100755 index 000000000..408f37e99 --- /dev/null +++ b/migrate-experimental.mjs @@ -0,0 +1,356 @@ +#!/usr/bin/env node + +import fs from 'fs/promises'; +import path from 'path'; +import { execSync } from 'child_process'; + +const EXPERIMENTAL_DIR = 'experimental'; + +// Map prefixes to their target directories +const PREFIX_MAP = { + // Gravity Forms Core & Related + 'gf': 'gravity-forms', + 'gflow': 'gravity-flow', + 'gfoai': 'gravityforms-openai', + + // Gravity Connect + 'gca': 'gc-airtable', + 'gcgs': 'gc-google-sheets', + 'gcn': 'gc-notion', + 'gcoai': 'gc-openai', + + // Gravity Perks + 'gpaa': 'gp-address-autocomplete', + 'gpac': 'gp-advanced-calculations', + 'gpapf': 'gp-advanced-phone-field', + 'gpasc': 'gp-advanced-save-and-continue', + 'gpadvs': 'gp-advanced-select', + 'gpalf': 'gp-auto-list-field', + 'gpal': 'gp-auto-login', + 'gpbua': 'gp-better-user-activation', + 'gpb': 'gp-blocklist', + 'gpcld': 'gp-conditional-logic-dates', + 'gpcp': 'gp-conditional-pricing', + 'gpcc': 'gp-copy-cat', + 'gpdtc': 'gp-date-time-calculator', + 'gpdec': 'gp-easy-passthrough', + 'gpep': 'gp-easy-passthrough', + 'gpepee': 'gp-easy-passthrough', + 'gpecf': 'gp-ecommerce-fields', + 'gpeu': 'gp-email-users', + 'gpeb': 'gp-entry-blocks', + 'gpfr': 'gp-file-renamer', + 'gpfup': 'gp-file-upload-pro', + 'gpgs': 'gp-google-sheets', + 'gpi': 'gp-inventory', + 'gplcb': 'gp-limit-checkboxes', + 'gplc': 'gp-limit-choices', + 'gpld': 'gp-limit-dates', + 'gpls': 'gp-limit-submissions', + 'gplp': 'gp-live-preview', + 'gpml': 'gp-media-library', + 'gpmpn': 'gp-multi-page-navigation', + 'gpnf': 'gp-nested-forms', + 'gpns': 'gp-notification-scheduler', + 'gppt': 'gp-page-transitions', + 'gpppw': 'gp-pay-per-word', + 'gppa': 'gp-populate-anything', + 'gppcmt': 'gp-post-content-merge-tags', + 'gpps': 'gp-preview-submission', + 'gppr': 'gp-price-range', + 'gpqr': 'gp-qr-code', + 'gpro': 'gp-read-only', + 'gprf': 'gp-reload-form', + 'gpuid': 'gp-unique-id', + 'gpwc': 'gp-word-count', + + // Gravity Shop + 'gspc': 'gs-product-configurator', + 'wcgfpa': 'wc-gf-product-addons', + + // General Gravity Wiz + 'gw': 'gravity-forms' +}; + +// Special cases that don't follow prefix pattern +const SPECIAL_CASES = { + 'gp-hide-perks-from-plugins-page.php': 'gravity-forms', + 'gp-update-perks-tab-title.php': 'gravity-forms' +}; + +async function getTargetDir(filename) { + // Check special cases first + if (SPECIAL_CASES[filename]) { + return SPECIAL_CASES[filename]; + } + + // Get the prefix from the filename + const prefix = Object.keys(PREFIX_MAP) + .sort((a, b) => b.length - a.length) // Sort by length descending to match longest prefix first + .find(prefix => filename.startsWith(prefix)); + + if (!prefix) { + throw new Error(`No matching prefix found for ${filename}`); + } + return PREFIX_MAP[prefix]; +} + +async function readFileContent(filepath) { + const content = await fs.readFile(filepath, 'utf8'); + return content; +} + +async function updateHeaderWithExperimental(content, filename) { + const lines = content.split('\n'); + const isPHP = filename.endsWith('.php'); + let headerStart = -1; + let headerEnd = -1; + + // Find the header block + for (let i = 0; i < lines.length; i++) { + if (lines[i].includes('/**')) { + headerStart = i; + } else if (headerStart !== -1 && lines[i].includes('*/')) { + headerEnd = i; + break; + } + } + + // If no header found, create a new one + if (headerStart === -1) { + const prefix = isPHP ? ' !line.includes('Experimental Snippet')); + + // Find title and URL lines + const titleLineIndex = cleanedHeaderLines.findIndex(line => { + const trimmed = line.trim(); + return trimmed.startsWith('* Gravity Wiz //') || trimmed.startsWith('* Gravity Perks //'); + }); + + // Find URL line + const urlLineIndex = cleanedHeaderLines.findIndex(line => + line.includes('https://') || line.includes('http://') + ); + + // Determine where to insert the experimental flag + let insertIndex; + if (urlLineIndex !== -1) { + // Insert after URL + insertIndex = urlLineIndex; + } else if (titleLineIndex !== -1) { + // Insert after title + insertIndex = titleLineIndex; + } else { + // No title found, insert after comment start + insertIndex = 0; + } + + // Add experimental flag with appropriate blank lines + if (insertIndex === 0) { + cleanedHeaderLines.splice(1, 0, ' * Experimental Snippet πŸ§ͺ'); + } else { + // Always add blank line before experimental flag + cleanedHeaderLines.splice(insertIndex + 1, 0, ' *', ' * Experimental Snippet πŸ§ͺ'); + } + + // Remove any duplicate blank lines + for (let i = cleanedHeaderLines.length - 2; i >= 0; i--) { + if (cleanedHeaderLines[i].trim() === '*' && cleanedHeaderLines[i + 1].trim() === '*') { + cleanedHeaderLines.splice(i, 1); + } + } + + // Reconstruct the file + let newContent = ''; + + // Add PHP tag if needed + if (isPHP) { + newContent += ' !line.includes(' r.status === 'Migrated').length, + alreadyMigrated: results.filter(r => r.status === 'Already Migrated').length, + targetExists: results.filter(r => r.status === 'Target Exists').length, + errors: results.filter(r => r.status === 'Error').length, + skipped: results.filter(r => r.status === 'Skipped').length, + total: results.length + }; + + // Print summary + console.log('\nMigration Summary:'); + console.log('================='); + console.log(`Total files: ${stats.total}`); + console.log(`βœ… Migrated: ${stats.migrated}`); + console.log(`⏭️ Already migrated: ${stats.alreadyMigrated}`); + console.log(`⚠️ Target exists: ${stats.targetExists}`); + console.log(`❌ Errors: ${stats.errors}`); + console.log(`⏩ Skipped: ${stats.skipped}`); + + // Print table header + console.log('\nDetailed Results:'); + console.log('| File | Target Directory | Status | Error |'); + console.log('|------|-----------------|---------|--------|'); + + // Print each result + results.forEach(result => { + const status = { + 'Migrated': 'βœ… Migrated', + 'Already Migrated': '⏭️ Already Migrated', + 'Target Exists': '⚠️ Target Exists', + 'Error': '❌ Error', + 'Skipped': '⏩ Skipped' + }[result.status]; + + console.log(`| \`${result.filename}\` | ${result.targetDir || '-'} | ${status} | ${result.error || '-'} |`); + }); +} + +async function main() { + try { + const files = await fs.readdir(EXPERIMENTAL_DIR); + const results = []; + + for (const file of files) { + const result = await processFile(file); + results.push(result); + } + + printResults(results); + } catch (err) { + console.error('Error:', err); + process.exit(1); + } +} + +main(); From bc01a70932fe41ae225c9e521c1e6f61218f63a5 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:47 -0600 Subject: [PATCH 02/82] `gfjs-early-init-scripts.php`: Migrated from experimental folder. --- {experimental => gravity-forms}/gfjs-early-init-scripts.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gfjs-early-init-scripts.php (96%) diff --git a/experimental/gfjs-early-init-scripts.php b/gravity-forms/gfjs-early-init-scripts.php similarity index 96% rename from experimental/gfjs-early-init-scripts.php rename to gravity-forms/gfjs-early-init-scripts.php index 469da1458..da977f220 100644 --- a/experimental/gfjs-early-init-scripts.php +++ b/gravity-forms/gfjs-early-init-scripts.php @@ -3,6 +3,8 @@ * Gravity Forms // Custom Javascript // Load Init Scripts Early * https://gravitywiz.com/gravity-forms-code-chest/ * + * Experimental Snippet πŸ§ͺ + * * Some perks (e.g. Copy Cat, Address Autocomplete) allow their initialization options to be filtered but the Custom JS * plugin outputs its scripts too late. This changes bumps GF Custom JS scripts to be output first. * From ec312cc83c9065e2865f94b859478e099e4d63a9 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:47 -0600 Subject: [PATCH 03/82] `gfsa-auto-allow-administrator-access.php`: Migrated from experimental folder. --- .../gfsa-auto-allow-administrator-access.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gfsa-auto-allow-administrator-access.php (89%) diff --git a/experimental/gfsa-auto-allow-administrator-access.php b/gravity-forms/gfsa-auto-allow-administrator-access.php similarity index 89% rename from experimental/gfsa-auto-allow-administrator-access.php rename to gravity-forms/gfsa-auto-allow-administrator-access.php index 1fa8e4e12..a98a3801e 100644 --- a/experimental/gfsa-auto-allow-administrator-access.php +++ b/gravity-forms/gfsa-auto-allow-administrator-access.php @@ -2,6 +2,8 @@ /** * Gravity Forms // Submit to Access // Auto-allow Access for Administrators * https://gravitywiz.com/submit-gravity-form-access-content/ + * + * Experimental Snippet πŸ§ͺ */ add_filter( 'gfsa_has_access', function( $has_access ) { return current_user_can( 'administrator' ); From c80c9fbb4f24a062e3f5e9d2aa990c03e951333a Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:47 -0600 Subject: [PATCH 04/82] `gpdec-delay-for-gravity-pdf-bg-processing.php`: Migrated from experimental folder. --- .../gpdec-delay-for-gravity-pdf-bg-processing.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename {experimental => gp-easy-passthrough}/gpdec-delay-for-gravity-pdf-bg-processing.php (98%) diff --git a/experimental/gpdec-delay-for-gravity-pdf-bg-processing.php b/gp-easy-passthrough/gpdec-delay-for-gravity-pdf-bg-processing.php similarity index 98% rename from experimental/gpdec-delay-for-gravity-pdf-bg-processing.php rename to gp-easy-passthrough/gpdec-delay-for-gravity-pdf-bg-processing.php index 154c0fc54..4b3659746 100644 --- a/experimental/gpdec-delay-for-gravity-pdf-bg-processing.php +++ b/gp-easy-passthrough/gpdec-delay-for-gravity-pdf-bg-processing.php @@ -1,9 +1,10 @@ Date: Tue, 7 Jan 2025 10:38:47 -0600 Subject: [PATCH 05/82] `gpdtc-calculated-input-value.php`: Migrated from experimental folder. --- .../gpdtc-calculated-input-value.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-date-time-calculator}/gpdtc-calculated-input-value.php (85%) diff --git a/experimental/gpdtc-calculated-input-value.php b/gp-date-time-calculator/gpdtc-calculated-input-value.php similarity index 85% rename from experimental/gpdtc-calculated-input-value.php rename to gp-date-time-calculator/gpdtc-calculated-input-value.php index 8d653c6a0..6ccb28e2a 100644 --- a/experimental/gpdtc-calculated-input-value.php +++ b/gp-date-time-calculator/gpdtc-calculated-input-value.php @@ -3,4 +3,6 @@ * This snippet has evolved! πŸ¦„ * Find the new version of this snippet here: * https://github.com/gravitywiz/snippet-library/blob/master/experimental/gpdtc-recalc.php + * + * Experimental Snippet πŸ§ͺ */ From 12325546aa29566530e2e6c20915927aa434f18e Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:48 -0600 Subject: [PATCH 06/82] `gpi-auto-selections.php`: Migrated from experimental folder. --- {experimental => gp-inventory}/gpi-auto-selections.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-inventory}/gpi-auto-selections.php (98%) diff --git a/experimental/gpi-auto-selections.php b/gp-inventory/gpi-auto-selections.php similarity index 98% rename from experimental/gpi-auto-selections.php rename to gp-inventory/gpi-auto-selections.php index 04ccc0647..b3c0ef12a 100644 --- a/experimental/gpi-auto-selections.php +++ b/gp-inventory/gpi-auto-selections.php @@ -2,6 +2,8 @@ /** * Gravity Perks // Inventory // Auto-selections * https://gravitywiz.com/documentation/gravity-forms-inventory/ + * + * Experimental Snippet πŸ§ͺ */ global $gpias_form_id, $gpias_list_field_id, $gpias_product_field_id; From 7a56b877a537e6a7e39c38a975ec85cf45369e79 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:48 -0600 Subject: [PATCH 07/82] `gpi-copy-exhausted-inventory-to-another-field.js`: Migrated from experimental folder. --- .../gpi-copy-exhausted-inventory-to-another-field.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-inventory}/gpi-copy-exhausted-inventory-to-another-field.js (95%) diff --git a/experimental/gpi-copy-exhausted-inventory-to-another-field.js b/gp-inventory/gpi-copy-exhausted-inventory-to-another-field.js similarity index 95% rename from experimental/gpi-copy-exhausted-inventory-to-another-field.js rename to gp-inventory/gpi-copy-exhausted-inventory-to-another-field.js index 063e11917..c5febca33 100644 --- a/experimental/gpi-copy-exhausted-inventory-to-another-field.js +++ b/gp-inventory/gpi-copy-exhausted-inventory-to-another-field.js @@ -2,6 +2,8 @@ * Gravity Perks // Inventory // Copy Exhausted Choices to Another Field * https://gravitywiz.com/documentation/gravity-forms-inventory/ * + * Experimental Snippet πŸ§ͺ + * * Instructions: * * 1. Install this snippet with our free Custom JavaScript plugin. From 88ade22ae9f319f70df33540b57d73ef973946f3 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:48 -0600 Subject: [PATCH 08/82] `gpi-gpnf-exclude-child-entries-when-attached-to-a-partial-entry.php`: Migrated from experimental folder. --- ...f-exclude-child-entries-when-attached-to-a-partial-entry.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-inventory}/gpi-gpnf-exclude-child-entries-when-attached-to-a-partial-entry.php (97%) diff --git a/experimental/gpi-gpnf-exclude-child-entries-when-attached-to-a-partial-entry.php b/gp-inventory/gpi-gpnf-exclude-child-entries-when-attached-to-a-partial-entry.php similarity index 97% rename from experimental/gpi-gpnf-exclude-child-entries-when-attached-to-a-partial-entry.php rename to gp-inventory/gpi-gpnf-exclude-child-entries-when-attached-to-a-partial-entry.php index 8f8a17acf..5fb89fe46 100644 --- a/experimental/gpi-gpnf-exclude-child-entries-when-attached-to-a-partial-entry.php +++ b/gp-inventory/gpi-gpnf-exclude-child-entries-when-attached-to-a-partial-entry.php @@ -3,6 +3,8 @@ * Gravity Perks // Inventory + Nested Forms // Exclude Child Entries of Partial Entry Parents from Inventory * https://gravitywiz.com/documentation/gravity-forms-nested-forms/ * + * Experimental Snippet πŸ§ͺ + * * WIP: This provides very basic support for excluding child entries attached to a partial entry parent * from inventory limits. * From e93571d8524be4144c98bb949f310be44d9a6a3c Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:48 -0600 Subject: [PATCH 09/82] `gpi-packaged-products.php`: Migrated from experimental folder. --- {experimental => gp-inventory}/gpi-packaged-products.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-inventory}/gpi-packaged-products.php (99%) diff --git a/experimental/gpi-packaged-products.php b/gp-inventory/gpi-packaged-products.php similarity index 99% rename from experimental/gpi-packaged-products.php rename to gp-inventory/gpi-packaged-products.php index f5c29ef5f..9c793fac4 100644 --- a/experimental/gpi-packaged-products.php +++ b/gp-inventory/gpi-packaged-products.php @@ -3,6 +3,8 @@ * Gravity Perks // Inventory // Packaged Products * https://gravitywiz.com/documentation/gravity-forms-inventory/ * + * Experimental Snippet πŸ§ͺ + * * Add dependencies between packaged products and products that are individually in the product. As packages are * bought, the individual items available inventory will also decrease by that much. If the available inventory of an * individual product is below the inventory of a package, it should use the lowest inventory amount amongst the packaged From ec5c1125e561e4152680b7ffbdd0b6a6d5d2a5d0 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:48 -0600 Subject: [PATCH 10/82] `gpnf-comma-delimited-email-list.php`: Migrated from experimental folder. --- {experimental => gp-limit-choices}/gplc-multiselect.js | 2 ++ .../gpnf-comma-delimited-email-list.php | 2 ++ 2 files changed, 4 insertions(+) rename {experimental => gp-limit-choices}/gplc-multiselect.js (86%) rename {experimental => gp-nested-forms}/gpnf-comma-delimited-email-list.php (96%) diff --git a/experimental/gplc-multiselect.js b/gp-limit-choices/gplc-multiselect.js similarity index 86% rename from experimental/gplc-multiselect.js rename to gp-limit-choices/gplc-multiselect.js index 6c799f237..089b5c090 100644 --- a/experimental/gplc-multiselect.js +++ b/gp-limit-choices/gplc-multiselect.js @@ -1,4 +1,6 @@ /** * This snippet has graduated from the experimental folder πŸŽ“ * You can now find the snippet here: https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-limit-multiselect.js + * + * Experimental Snippet πŸ§ͺ */ diff --git a/experimental/gpnf-comma-delimited-email-list.php b/gp-nested-forms/gpnf-comma-delimited-email-list.php similarity index 96% rename from experimental/gpnf-comma-delimited-email-list.php rename to gp-nested-forms/gpnf-comma-delimited-email-list.php index 994c59a35..4a04aef06 100644 --- a/experimental/gpnf-comma-delimited-email-list.php +++ b/gp-nested-forms/gpnf-comma-delimited-email-list.php @@ -3,6 +3,8 @@ * Gravity Perks // Nested Forms // Convert Simple List to Comma-delimited List of Emails * https://gravitywiz.com/documentation/gravity-forms-nested-forms/ * + * Experimental Snippet πŸ§ͺ + * * Requires the All Fields Template plugin: https://gravitywiz.com/gravity-forms-all-fields-template/ * * Example usage: {My Nested Form Field:1:filter[2]:listemails} From 538a6241c8cbd7f75105f03186277311f6175304 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:49 -0600 Subject: [PATCH 11/82] `gpnf-count-answered-child-fields.js`: Migrated from experimental folder. --- .../gpnf-count-answered-child-fields.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-nested-forms}/gpnf-count-answered-child-fields.js (97%) diff --git a/experimental/gpnf-count-answered-child-fields.js b/gp-nested-forms/gpnf-count-answered-child-fields.js similarity index 97% rename from experimental/gpnf-count-answered-child-fields.js rename to gp-nested-forms/gpnf-count-answered-child-fields.js index 635227ba1..5a795b6af 100644 --- a/experimental/gpnf-count-answered-child-fields.js +++ b/gp-nested-forms/gpnf-count-answered-child-fields.js @@ -2,6 +2,8 @@ * Gravity Perks // Nested Forms // Count the Number of "Answered" Child Fields * https://gravitywiz.com/documentation/gravity-forms-nested-forms/ * + * Experimental Snippet πŸ§ͺ + * * This is designed for use with our [GF Custom Javascript](https://gravitywiz.com/gravity-forms-code-chest/) plugin. */ // Update "1" to your Nested Form field ID. From cd5560dffc76fc09dd4dead5cee61993b9ec43d9 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:49 -0600 Subject: [PATCH 12/82] `gpnf-delete-expired-orphans.php`: Migrated from experimental folder. --- .../gpnf-delete-expired-orphans.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-nested-forms}/gpnf-delete-expired-orphans.php (93%) diff --git a/experimental/gpnf-delete-expired-orphans.php b/gp-nested-forms/gpnf-delete-expired-orphans.php similarity index 93% rename from experimental/gpnf-delete-expired-orphans.php rename to gp-nested-forms/gpnf-delete-expired-orphans.php index dc1b793d2..8a93e1554 100644 --- a/experimental/gpnf-delete-expired-orphans.php +++ b/gp-nested-forms/gpnf-delete-expired-orphans.php @@ -2,6 +2,8 @@ /** * Gravity Perks // Nested Forms // Delete Expired Orphan Child Entries (Instead of Trashing) * https://gravitywiz.com/documentation/gravity-forms-nested-forms/ + * + * Experimental Snippet πŸ§ͺ */ add_action( 'gform_update_status', function( $entry_id, $new_status ) { if ( $new_status === 'trash' ) { From 448650dc5771ea566187a54bc91dccf7b18e2582 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:49 -0600 Subject: [PATCH 13/82] `gpnf-exclude-gf-inline-scripts-from-cloudflare-rocket-loader.php`: Migrated from experimental folder. --- ...-exclude-gf-inline-scripts-from-cloudflare-rocket-loader.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-nested-forms}/gpnf-exclude-gf-inline-scripts-from-cloudflare-rocket-loader.php (92%) diff --git a/experimental/gpnf-exclude-gf-inline-scripts-from-cloudflare-rocket-loader.php b/gp-nested-forms/gpnf-exclude-gf-inline-scripts-from-cloudflare-rocket-loader.php similarity index 92% rename from experimental/gpnf-exclude-gf-inline-scripts-from-cloudflare-rocket-loader.php rename to gp-nested-forms/gpnf-exclude-gf-inline-scripts-from-cloudflare-rocket-loader.php index e813dc79b..0b4cfd2c1 100644 --- a/experimental/gpnf-exclude-gf-inline-scripts-from-cloudflare-rocket-loader.php +++ b/gp-nested-forms/gpnf-exclude-gf-inline-scripts-from-cloudflare-rocket-loader.php @@ -2,6 +2,8 @@ /** * Gravity Perks // Nested Forms // Exclude Gravity Forms Inline Scripts from CloudFlare's Rocket Loaderβ„’. * https://gravitywiz.com/documentation/gravity-forms-nested-forms/ + * + * Experimental Snippet πŸ§ͺ */ add_filter( 'wp_inline_script_attributes', function ( $attributes, $javascript ) { if ( strpos( $javascript, 'gform.' ) ) { From 668becad12bb9222198b001720a8cb0110b09cc5 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:49 -0600 Subject: [PATCH 14/82] `gpnf-gravity-view-values.php`: Migrated from experimental folder. --- {experimental => gp-nested-forms}/gpnf-gravity-view-values.php | 1 + 1 file changed, 1 insertion(+) rename {experimental => gp-nested-forms}/gpnf-gravity-view-values.php (96%) diff --git a/experimental/gpnf-gravity-view-values.php b/gp-nested-forms/gpnf-gravity-view-values.php similarity index 96% rename from experimental/gpnf-gravity-view-values.php rename to gp-nested-forms/gpnf-gravity-view-values.php index 45d11f392..f3cca24cf 100644 --- a/experimental/gpnf-gravity-view-values.php +++ b/gp-nested-forms/gpnf-gravity-view-values.php @@ -1,5 +1,6 @@ Date: Tue, 7 Jan 2025 10:38:49 -0600 Subject: [PATCH 15/82] `gpnf-gv-duplicate-child-entries.php`: Migrated from experimental folder. --- .../gpnf-gv-duplicate-child-entries.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-nested-forms}/gpnf-gv-duplicate-child-entries.php (88%) diff --git a/experimental/gpnf-gv-duplicate-child-entries.php b/gp-nested-forms/gpnf-gv-duplicate-child-entries.php similarity index 88% rename from experimental/gpnf-gv-duplicate-child-entries.php rename to gp-nested-forms/gpnf-gv-duplicate-child-entries.php index 415c8a65e..1d4697de4 100644 --- a/experimental/gpnf-gv-duplicate-child-entries.php +++ b/gp-nested-forms/gpnf-gv-duplicate-child-entries.php @@ -3,4 +3,6 @@ * This snippet has graduated from the experimental folder. πŸŽ“ * You can now find the snippet here: * https://github.com/gravitywiz/snippet-library/gp-nested-forms/gpnf-duplicate-child-entries-on-parent-duplication.php + * + * Experimental Snippet πŸ§ͺ */ From 73ab03144a75ee6f04c4aa2789bddd02f2db50c4 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:49 -0600 Subject: [PATCH 16/82] `gpnf-lock-child-entries-by-date.php`: Migrated from experimental folder. --- .../gpnf-lock-child-entries-by-date.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-nested-forms}/gpnf-lock-child-entries-by-date.php (97%) diff --git a/experimental/gpnf-lock-child-entries-by-date.php b/gp-nested-forms/gpnf-lock-child-entries-by-date.php similarity index 97% rename from experimental/gpnf-lock-child-entries-by-date.php rename to gp-nested-forms/gpnf-lock-child-entries-by-date.php index 38e4ba896..c375ae460 100644 --- a/experimental/gpnf-lock-child-entries-by-date.php +++ b/gp-nested-forms/gpnf-lock-child-entries-by-date.php @@ -3,6 +3,8 @@ * Gravity Perks // Nested Forms // Lock Child Entries by Date * https://gravitywiz.com/documentation/gravity-forms-nested-forms/ * + * Experimental Snippet πŸ§ͺ + * * When editing a parent entry via Entry Blocks or GravityView, this snippet will allow you * to prevent child entries from being edited (or deleted) after a given date. * From 9d6def7c3d2abd778e38d83179edbd31afaee6b7 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:50 -0600 Subject: [PATCH 17/82] `gpnf-modify-display-value-by-date.php`: Migrated from experimental folder. --- .../gpnf-modify-display-value-by-date.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-nested-forms}/gpnf-modify-display-value-by-date.php (96%) diff --git a/experimental/gpnf-modify-display-value-by-date.php b/gp-nested-forms/gpnf-modify-display-value-by-date.php similarity index 96% rename from experimental/gpnf-modify-display-value-by-date.php rename to gp-nested-forms/gpnf-modify-display-value-by-date.php index 7173cf14e..af90a683b 100644 --- a/experimental/gpnf-modify-display-value-by-date.php +++ b/gp-nested-forms/gpnf-modify-display-value-by-date.php @@ -3,6 +3,8 @@ * Gravity Perks // Nested Forms // Modify Display Value by Date * https://gravitywiz.com/documentation/gravity-forms-nested-forms/ * + * Experimental Snippet πŸ§ͺ + * * This experimental snippet allows you to modify the display value of a Date field if the current date is greater than * the date saved in the given field. * From 7c61aee0f2f7d621c763c4ee44e0d8e6861199a2 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:50 -0600 Subject: [PATCH 18/82] `gpnf-parent-form-field-values-in-child-form-filters.php`: Migrated from experimental folder. --- .../gpnf-parent-form-field-values-in-child-form-filters.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-nested-forms}/gpnf-parent-form-field-values-in-child-form-filters.php (97%) diff --git a/experimental/gpnf-parent-form-field-values-in-child-form-filters.php b/gp-nested-forms/gpnf-parent-form-field-values-in-child-form-filters.php similarity index 97% rename from experimental/gpnf-parent-form-field-values-in-child-form-filters.php rename to gp-nested-forms/gpnf-parent-form-field-values-in-child-form-filters.php index f2b4fe0c4..fb2c364b3 100644 --- a/experimental/gpnf-parent-form-field-values-in-child-form-filters.php +++ b/gp-nested-forms/gpnf-parent-form-field-values-in-child-form-filters.php @@ -3,6 +3,8 @@ * Gravity Perks // Nested Forms // Fetch Parent form values when prerendering Child form * https://gravitywiz.com/documentation/gravity-forms-nested-forms/ * + * Experimental Snippet πŸ§ͺ + * * This demonstrates a proof-of-concept for storing and retrieving parent form field values for use in the * `gform_pre_render` filter when modifying the child form. * From 77c12e9447d216d664f0f77dd1c20bbdb5ee4261 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:50 -0600 Subject: [PATCH 19/82] `gpnf-preserve-child-entry-created-by.php`: Migrated from experimental folder. --- .../gpnf-preserve-child-entry-created-by.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-nested-forms}/gpnf-preserve-child-entry-created-by.php (94%) diff --git a/experimental/gpnf-preserve-child-entry-created-by.php b/gp-nested-forms/gpnf-preserve-child-entry-created-by.php similarity index 94% rename from experimental/gpnf-preserve-child-entry-created-by.php rename to gp-nested-forms/gpnf-preserve-child-entry-created-by.php index e9d798101..17f06df0f 100644 --- a/experimental/gpnf-preserve-child-entry-created-by.php +++ b/gp-nested-forms/gpnf-preserve-child-entry-created-by.php @@ -3,6 +3,8 @@ * Gravity Perks // Nested Forms // Preserve Child Entry's Original "created_by" Property * https://gravitywiz.com/documentation/gravity-forms-nested-forms/ * + * Experimental Snippet πŸ§ͺ + * * This snippet will need to be revisited if we ever use the GP_Nested_Forms::handle_parent_submission_post_save() filter * to handle anything besides setting the child entry "created_by" property. */ From 734a708d404e92520e9e9252ba09415d92f1b782 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:50 -0600 Subject: [PATCH 20/82] `gpnf-restore-default-value-on-edit.php`: Migrated from experimental folder. --- .../gpnf-restore-default-value-on-edit.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-nested-forms}/gpnf-restore-default-value-on-edit.php (95%) diff --git a/experimental/gpnf-restore-default-value-on-edit.php b/gp-nested-forms/gpnf-restore-default-value-on-edit.php similarity index 95% rename from experimental/gpnf-restore-default-value-on-edit.php rename to gp-nested-forms/gpnf-restore-default-value-on-edit.php index 8ee1ed766..ffebca2f5 100644 --- a/experimental/gpnf-restore-default-value-on-edit.php +++ b/gp-nested-forms/gpnf-restore-default-value-on-edit.php @@ -3,6 +3,8 @@ * Gravity Perks // Nested Forms // Restore Default Value in Child Entry Edit * https://gravitywiz.com/documentation/gravity-forms-nested-forms/ * + * Experimental Snippet πŸ§ͺ + * * Use this snippet to restore the default value of a given field when it is edited via a Nested Form field. */ // Update "123" to your parent form ID and "4" to your Nested Form field ID. From 9807c1b1cff394f241c33e09149949f379101e08 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:50 -0600 Subject: [PATCH 21/82] `gpnf-sortable-entries.php`: Migrated from experimental folder. --- {experimental => gp-nested-forms}/gpnf-sortable-entries.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-nested-forms}/gpnf-sortable-entries.php (99%) diff --git a/experimental/gpnf-sortable-entries.php b/gp-nested-forms/gpnf-sortable-entries.php similarity index 99% rename from experimental/gpnf-sortable-entries.php rename to gp-nested-forms/gpnf-sortable-entries.php index b7af81ce7..f1026b303 100644 --- a/experimental/gpnf-sortable-entries.php +++ b/gp-nested-forms/gpnf-sortable-entries.php @@ -3,6 +3,8 @@ * Gravity Perks // Nested Forms // Sortable Entries * https://gravitywiz.com/documentation/gravity-forms-nested-forms/ * + * Experimental Snippet πŸ§ͺ + * * Instructions: * * 1. Install this code as a plugin or as a snippet (https://gravitywiz.com/documentation/how-do-i-install-a-snippet/) From 71b7e5b4db77712f22c1d24472b11682d31a9792 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:50 -0600 Subject: [PATCH 22/82] `gppa-acf-populate-multiple-items-from-repeater-row.php`: Migrated from experimental folder. --- .../gppa-acf-populate-multiple-items-from-repeater-row.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-acf-populate-multiple-items-from-repeater-row.php (96%) diff --git a/experimental/gppa-acf-populate-multiple-items-from-repeater-row.php b/gp-populate-anything/gppa-acf-populate-multiple-items-from-repeater-row.php similarity index 96% rename from experimental/gppa-acf-populate-multiple-items-from-repeater-row.php rename to gp-populate-anything/gppa-acf-populate-multiple-items-from-repeater-row.php index a1a809ec3..231f9fb5f 100644 --- a/experimental/gppa-acf-populate-multiple-items-from-repeater-row.php +++ b/gp-populate-anything/gppa-acf-populate-multiple-items-from-repeater-row.php @@ -2,6 +2,8 @@ /** * Gravity Perks // Populate Anything // Display Multiple Items from Repeater Row * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ + * + * Experimental Snippet πŸ§ͺ */ // Update "123" to your form ID and "4" to your GPPA-populated field ID. add_filter( 'gppa_input_choices_123_4', function( $choices, $field, $objects ) { From b383b51a1fae18ad94c10698c0c2a9a56abdf7ee Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:51 -0600 Subject: [PATCH 23/82] `gppa-click-image-choice-image-wrapper.js`: Migrated from experimental folder. --- .../gppa-click-image-choice-image-wrapper.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-click-image-choice-image-wrapper.js (95%) diff --git a/experimental/gppa-click-image-choice-image-wrapper.js b/gp-populate-anything/gppa-click-image-choice-image-wrapper.js similarity index 95% rename from experimental/gppa-click-image-choice-image-wrapper.js rename to gp-populate-anything/gppa-click-image-choice-image-wrapper.js index a1db82bac..908391f2c 100644 --- a/experimental/gppa-click-image-choice-image-wrapper.js +++ b/gp-populate-anything/gppa-click-image-choice-image-wrapper.js @@ -2,6 +2,8 @@ * Gravity Wiz // GP Populate Anything // Trigger GPPA update on Image Choice Wrapper Click. * http://gravitywiz.com/documentation/gravity-forms-populate-anything * + * Experimental Snippet πŸ§ͺ + * * Instructions: * 1. Install our free Custom Javascript for Gravity Forms plugin. * Download the plugin here: https://gravitywiz.com/gravity-forms-code-chest/ From 75e363f03600a5b3ebeeddc29d23616f3a167e19 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:51 -0600 Subject: [PATCH 24/82] `gppa-conditional-logic-when-no-results.js`: Migrated from experimental folder. --- .../gppa-conditional-logic-when-no-results.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-conditional-logic-when-no-results.js (96%) diff --git a/experimental/gppa-conditional-logic-when-no-results.js b/gp-populate-anything/gppa-conditional-logic-when-no-results.js similarity index 96% rename from experimental/gppa-conditional-logic-when-no-results.js rename to gp-populate-anything/gppa-conditional-logic-when-no-results.js index 56a67e9aa..95c09f6d8 100644 --- a/experimental/gppa-conditional-logic-when-no-results.js +++ b/gp-populate-anything/gppa-conditional-logic-when-no-results.js @@ -2,6 +2,8 @@ * Gravity Perks // Populate Anything // Conditional Logic using a field that populates with no result * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ * + * Experimental Snippet πŸ§ͺ + * * 1. Install this snippet with our free Custom JavaScript plugin. * https://gravitywiz.com/gravity-forms-code-chest/ */ From ef1069f3b6434e72027ed4db2e35c4242915727d Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:51 -0600 Subject: [PATCH 25/82] `gppa-conditionally-exclude-filter-by-field-value.php`: Migrated from experimental folder. --- .../gppa-conditionally-exclude-filter-by-field-value.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-conditionally-exclude-filter-by-field-value.php (96%) diff --git a/experimental/gppa-conditionally-exclude-filter-by-field-value.php b/gp-populate-anything/gppa-conditionally-exclude-filter-by-field-value.php similarity index 96% rename from experimental/gppa-conditionally-exclude-filter-by-field-value.php rename to gp-populate-anything/gppa-conditionally-exclude-filter-by-field-value.php index fc3d060a9..5f7b7fbae 100644 --- a/experimental/gppa-conditionally-exclude-filter-by-field-value.php +++ b/gp-populate-anything/gppa-conditionally-exclude-filter-by-field-value.php @@ -2,6 +2,8 @@ /** * Gravity Perks // Populate Anything // Conditionally Exclude Filter by Field Value * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ + * + * Experimental Snippet πŸ§ͺ */ add_filter( 'gppa_object_type_query', function( $query, $args ) { // Update "123 to your form ID and "4" to your field ID that is being populated. From 74d5d9c507bcf8d62a02518b8cf6d22bf4663dfc Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:51 -0600 Subject: [PATCH 26/82] `gppa-enable-choice-values-for-gravity-view.php`: Migrated from experimental folder. --- .../gppa-enable-choice-values-for-gravity-view.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-enable-choice-values-for-gravity-view.php (95%) diff --git a/experimental/gppa-enable-choice-values-for-gravity-view.php b/gp-populate-anything/gppa-enable-choice-values-for-gravity-view.php similarity index 95% rename from experimental/gppa-enable-choice-values-for-gravity-view.php rename to gp-populate-anything/gppa-enable-choice-values-for-gravity-view.php index 3b6525de8..289951364 100644 --- a/experimental/gppa-enable-choice-values-for-gravity-view.php +++ b/gp-populate-anything/gppa-enable-choice-values-for-gravity-view.php @@ -4,6 +4,8 @@ * will present the option to show the value or label when including this field in a view. * * See: https://secure.helpscout.net/conversation/1511770443/24411/#thread-4407403575 + * + * Experimental Snippet πŸ§ͺ */ add_filter( 'gform_form_post_get_meta', function( $form ) { From 1d70161d68e0c661c56c567be8eb82f67d62f755 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:51 -0600 Subject: [PATCH 27/82] `gppa-faceted-filters.php`: Migrated from experimental folder. --- {experimental => gp-populate-anything}/gppa-faceted-filters.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-faceted-filters.php (97%) diff --git a/experimental/gppa-faceted-filters.php b/gp-populate-anything/gppa-faceted-filters.php similarity index 97% rename from experimental/gppa-faceted-filters.php rename to gp-populate-anything/gppa-faceted-filters.php index a731b104b..008562c4e 100644 --- a/experimental/gppa-faceted-filters.php +++ b/gp-populate-anything/gppa-faceted-filters.php @@ -6,6 +6,8 @@ * * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ * + * Experimental Snippet πŸ§ͺ + * * Instructions: * 1. Add to site (https://gravitywiz.com/documentation/how-do-i-install-a-snippet/) * 2. Update field ID and form ID accordingly. In this snippet they are set to 5 and 2 respectively. From 0b96c6fd9579557731e7585d3bd7da64804a7312 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:51 -0600 Subject: [PATCH 28/82] `gppa-filter-entries-by-time-field.php`: Migrated from experimental folder. --- .../gppa-filter-entries-by-time-field.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-filter-entries-by-time-field.php (97%) diff --git a/experimental/gppa-filter-entries-by-time-field.php b/gp-populate-anything/gppa-filter-entries-by-time-field.php similarity index 97% rename from experimental/gppa-filter-entries-by-time-field.php rename to gp-populate-anything/gppa-filter-entries-by-time-field.php index 1d47d4aa9..e557f8382 100644 --- a/experimental/gppa-filter-entries-by-time-field.php +++ b/gp-populate-anything/gppa-filter-entries-by-time-field.php @@ -3,6 +3,8 @@ * Gravity Perks // Populate Anything // Filter Entries by Time Field * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ * + * Experimental Snippet πŸ§ͺ + * * Filter entry choices by a Time field on the source form. For example, if your source form is used * to collect events, including their start date and time, use this snippet to only populate events * that have yet to start in your target form. From a8d4c6827203ca66e27d69a33aa18929bb467026 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:51 -0600 Subject: [PATCH 29/82] `gppa-firefox-select-fixer.js`: Migrated from experimental folder. --- .../gppa-firefox-select-fixer.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-firefox-select-fixer.js (96%) diff --git a/experimental/gppa-firefox-select-fixer.js b/gp-populate-anything/gppa-firefox-select-fixer.js similarity index 96% rename from experimental/gppa-firefox-select-fixer.js rename to gp-populate-anything/gppa-firefox-select-fixer.js index 4067e5e70..07992c3d0 100644 --- a/experimental/gppa-firefox-select-fixer.js +++ b/gp-populate-anything/gppa-firefox-select-fixer.js @@ -2,6 +2,8 @@ * Gravity Wiz // Populate Anything // Firefox Select Fixer * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Firefox will auto-fill fields (including select fields) with the selected option upon * refresh. This can be problematic with Populate Anything if fields or Live Merge Tags rely * upon the value of the select as Firefox does not trigger any events. To work around this, we From e7b8d7319b713ffec517e88d38ad6ba182ceb056 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:51 -0600 Subject: [PATCH 30/82] `gppa-google-sheets-filter-by-date.php`: Migrated from experimental folder. --- .../gppa-google-sheets-filter-by-date.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-google-sheets-filter-by-date.php (95%) diff --git a/experimental/gppa-google-sheets-filter-by-date.php b/gp-populate-anything/gppa-google-sheets-filter-by-date.php similarity index 95% rename from experimental/gppa-google-sheets-filter-by-date.php rename to gp-populate-anything/gppa-google-sheets-filter-by-date.php index aaf623465..336c4d06e 100644 --- a/experimental/gppa-google-sheets-filter-by-date.php +++ b/gp-populate-anything/gppa-google-sheets-filter-by-date.php @@ -2,6 +2,8 @@ /** * Gravity Perks // Populate Anything + Google Sheets // Convert Date Format in Date Field for Search to m/d/y * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ + * + * Experimental Snippet πŸ§ͺ * https://gravitywiz.com/populate-gravity-forms-with-google-sheets/ */ add_filter( 'gppa_replace_filter_value_variables_google_sheet', function ( $filter_value ) { From c8f3c0c797026cfa8920f6f6a63769251ddea6bc Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:52 -0600 Subject: [PATCH 31/82] `gppa-gv-display-field-value.php`: Migrated from experimental folder. --- .../gppa-gv-display-field-value.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-gv-display-field-value.php (96%) diff --git a/experimental/gppa-gv-display-field-value.php b/gp-populate-anything/gppa-gv-display-field-value.php similarity index 96% rename from experimental/gppa-gv-display-field-value.php rename to gp-populate-anything/gppa-gv-display-field-value.php index 3210789c4..080b0bbfd 100644 --- a/experimental/gppa-gv-display-field-value.php +++ b/gp-populate-anything/gppa-gv-display-field-value.php @@ -2,6 +2,8 @@ /** * Show values instead of labels for Populate-Anything-enabled fields in GravityView. * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ + * + * Experimental Snippet πŸ§ͺ */ add_filter( 'gform_entry_field_value', function( $display_value, $field, $entry, $form ) { From 364bc1a251e713f1ac863b4f2d66f4443e5bf688 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:52 -0600 Subject: [PATCH 32/82] `gppa-hydrate-choices-on-entry-list.php`: Migrated from experimental folder. --- .../gppa-hydrate-choices-on-entry-list.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-hydrate-choices-on-entry-list.php (96%) diff --git a/experimental/gppa-hydrate-choices-on-entry-list.php b/gp-populate-anything/gppa-hydrate-choices-on-entry-list.php similarity index 96% rename from experimental/gppa-hydrate-choices-on-entry-list.php rename to gp-populate-anything/gppa-hydrate-choices-on-entry-list.php index d95ecec27..919f4cd87 100644 --- a/experimental/gppa-hydrate-choices-on-entry-list.php +++ b/gp-populate-anything/gppa-hydrate-choices-on-entry-list.php @@ -3,6 +3,8 @@ * Gravity Perks // Populate Anything // Hydrate form on Entry List page to include dynamic choices * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ * + * Experimental Snippet πŸ§ͺ + * * Installation: https://gravitywiz.com/documentation/how-do-i-install-a-snippet/ * * Limitations: From 6484bcab58d4887ea7d1bad2e40900b0b4c16369 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:52 -0600 Subject: [PATCH 33/82] `gppa-lmt-numbers-only-modifier.php`: Migrated from experimental folder. --- .../gppa-lmt-numbers-only-modifier.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-lmt-numbers-only-modifier.php (93%) diff --git a/experimental/gppa-lmt-numbers-only-modifier.php b/gp-populate-anything/gppa-lmt-numbers-only-modifier.php similarity index 93% rename from experimental/gppa-lmt-numbers-only-modifier.php rename to gp-populate-anything/gppa-lmt-numbers-only-modifier.php index 6f7253b82..35df1a555 100644 --- a/experimental/gppa-lmt-numbers-only-modifier.php +++ b/gp-populate-anything/gppa-lmt-numbers-only-modifier.php @@ -2,6 +2,8 @@ /** * Gravity Perks // Populate Anything // Live Merge Tags: Numbers Only Modifier * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ + * + * Experimental Snippet πŸ§ͺ */ add_filter( 'gppa_live_merge_tag_value', function( $value, $merge_tag, $form, $field_id, $entry_values ) { if ( strpos( $merge_tag, ':numbersonly' ) !== false && preg_match( '/([0-9]+)/', $value, $matches ) ) { From 6adc638dc3c7e7fa7846b0787549ded90cdd77eb Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:52 -0600 Subject: [PATCH 34/82] `gppa-multi-file-value-as-links.php`: Migrated from experimental folder. --- .../gppa-multi-file-value-as-links.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-multi-file-value-as-links.php (96%) diff --git a/experimental/gppa-multi-file-value-as-links.php b/gp-populate-anything/gppa-multi-file-value-as-links.php similarity index 96% rename from experimental/gppa-multi-file-value-as-links.php rename to gp-populate-anything/gppa-multi-file-value-as-links.php index c032ab52b..ba67404c0 100644 --- a/experimental/gppa-multi-file-value-as-links.php +++ b/gp-populate-anything/gppa-multi-file-value-as-links.php @@ -3,6 +3,8 @@ * Gravity Perks // Populate Anything // Format Comma-delimited List of Files as Links * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ * + * Experimental Snippet πŸ§ͺ + * * Populate a Single Line Text field with the value of a Multi-file Upload field and then use this snippet to display * the file URLs as links instead of plain text. */ From 9d9a6b512c4dbf7f2d33f980917a3db97bc65dba Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:53 -0600 Subject: [PATCH 35/82] `gppa-object-type-acf-options-page.php`: Migrated from experimental folder. --- .../gppa-object-type-acf-options-page.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-object-type-acf-options-page.php (98%) diff --git a/experimental/gppa-object-type-acf-options-page.php b/gp-populate-anything/gppa-object-type-acf-options-page.php similarity index 98% rename from experimental/gppa-object-type-acf-options-page.php rename to gp-populate-anything/gppa-object-type-acf-options-page.php index eae3eb72c..3134b0940 100644 --- a/experimental/gppa-object-type-acf-options-page.php +++ b/gp-populate-anything/gppa-object-type-acf-options-page.php @@ -3,6 +3,8 @@ * Gravity Perks // Populate Anything // Advanced Custom Fields Options Page Integration * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ * + * Experimental Snippet πŸ§ͺ + * * This snippet adds a new Object Type that enables pulling values directly from Options Pages added via * Advanced Custom Fields. For more on Options Pages, see https://www.advancedcustomfields.com/resources/options-page/ * From f826b639f71d68bb3c4046a47df48384c0400478 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:53 -0600 Subject: [PATCH 36/82] `gppa-object-type-json-api-with-query-params.php`: Migrated from experimental folder. --- .../gppa-object-type-json-api-with-query-params.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-object-type-json-api-with-query-params.php (99%) diff --git a/experimental/gppa-object-type-json-api-with-query-params.php b/gp-populate-anything/gppa-object-type-json-api-with-query-params.php similarity index 99% rename from experimental/gppa-object-type-json-api-with-query-params.php rename to gp-populate-anything/gppa-object-type-json-api-with-query-params.php index b7b0fbe82..de6792f71 100644 --- a/experimental/gppa-object-type-json-api-with-query-params.php +++ b/gp-populate-anything/gppa-object-type-json-api-with-query-params.php @@ -3,6 +3,8 @@ * Gravity Perks // Populate Anything // JSON API with Query Params * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ * + * Experimental Snippet πŸ§ͺ + * * This snippet adds a new Object Type * * THE SOFTWARE/SNIPPET IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT From 9213927ab007d950df3fc0c7bf94246cdf8d0795 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:53 -0600 Subject: [PATCH 37/82] `gppa-object-type-json-api.php`: Migrated from experimental folder. --- .../gppa-object-type-json-api.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-object-type-json-api.php (99%) diff --git a/experimental/gppa-object-type-json-api.php b/gp-populate-anything/gppa-object-type-json-api.php similarity index 99% rename from experimental/gppa-object-type-json-api.php rename to gp-populate-anything/gppa-object-type-json-api.php index 1780af3ef..8e6f30558 100644 --- a/experimental/gppa-object-type-json-api.php +++ b/gp-populate-anything/gppa-object-type-json-api.php @@ -3,6 +3,8 @@ * Gravity Perks // Populate Anything // JSON API Object Type * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ * + * Experimental Snippet πŸ§ͺ + * * This snippet adds a new Object Type that pulls from a JSON file containing airports and their IATA codes. * Use this snippet as a starting point for other HTTP-based APIs that you would like to populate fields from. * From 9ee1450fbd26f4672a23f2f544dff4e533c13d80 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:53 -0600 Subject: [PATCH 38/82] `gppa-page-modifier.php`: Migrated from experimental folder. --- {experimental => gp-populate-anything}/gppa-page-modifier.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-page-modifier.php (99%) diff --git a/experimental/gppa-page-modifier.php b/gp-populate-anything/gppa-page-modifier.php similarity index 99% rename from experimental/gppa-page-modifier.php rename to gp-populate-anything/gppa-page-modifier.php index 203dc31e0..586e67a76 100644 --- a/experimental/gppa-page-modifier.php +++ b/gp-populate-anything/gppa-page-modifier.php @@ -3,6 +3,8 @@ * Gravity Perks // Populate Anything // Page Modifier * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ * + * Experimental Snippet πŸ§ͺ + * * This snippet allows you to use the `:page` modifier to only process Live Merge Tags on a specific page of a * multi-page form. This is useful when... * From f1b0c80f607a42a272442c6e14f18f849f9a97fb Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:53 -0600 Subject: [PATCH 39/82] `gppa-populate-and-delete-coupons.php`: Migrated from experimental folder. --- .../gppa-populate-and-delete-coupons.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-populate-and-delete-coupons.php (96%) diff --git a/experimental/gppa-populate-and-delete-coupons.php b/gp-populate-anything/gppa-populate-and-delete-coupons.php similarity index 96% rename from experimental/gppa-populate-and-delete-coupons.php rename to gp-populate-anything/gppa-populate-and-delete-coupons.php index df46c871e..2a404e5b4 100644 --- a/experimental/gppa-populate-and-delete-coupons.php +++ b/gp-populate-anything/gppa-populate-and-delete-coupons.php @@ -3,6 +3,8 @@ * Gravity Perks // Populate Anything // Populate & Delete Coupons * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ * + * Experimental Snippet πŸ§ͺ + * * This experimental snippet demonstrates how to populate a Drop Down field with coupons (assisted by Populate Anything) * and then delete the selected coupon on submission. */ From 6ce19d410a9fc6a7d865adebfa880020ebf1323d Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:53 -0600 Subject: [PATCH 40/82] `gppa-populate-date-in-fields-format.php`: Migrated from experimental folder. --- .../gppa-populate-date-in-fields-format.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-populate-date-in-fields-format.php (95%) diff --git a/experimental/gppa-populate-date-in-fields-format.php b/gp-populate-anything/gppa-populate-date-in-fields-format.php similarity index 95% rename from experimental/gppa-populate-date-in-fields-format.php rename to gp-populate-anything/gppa-populate-date-in-fields-format.php index 6033735dd..551b228ea 100644 --- a/experimental/gppa-populate-date-in-fields-format.php +++ b/gp-populate-anything/gppa-populate-date-in-fields-format.php @@ -2,6 +2,8 @@ /** * Gravity Perks // Populate Anything // Populate Date in Field's Format * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ + * + * Experimental Snippet πŸ§ͺ */ add_filter( 'gppa_process_template_value', function( $value, $field ) { if ( $field->get_input_type() === 'date' && $field->dateType === 'datepicker' ) { From cca94d38c5ea61e32162e3bc6e2801bfba1ae958 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:54 -0600 Subject: [PATCH 41/82] `gppa-remove-filter-groups-with-missing-values.php`: Migrated from experimental folder. --- .../gppa-remove-filter-groups-with-missing-values.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-remove-filter-groups-with-missing-values.php (96%) diff --git a/experimental/gppa-remove-filter-groups-with-missing-values.php b/gp-populate-anything/gppa-remove-filter-groups-with-missing-values.php similarity index 96% rename from experimental/gppa-remove-filter-groups-with-missing-values.php rename to gp-populate-anything/gppa-remove-filter-groups-with-missing-values.php index 9948cc8f3..afd9a17f5 100644 --- a/experimental/gppa-remove-filter-groups-with-missing-values.php +++ b/gp-populate-anything/gppa-remove-filter-groups-with-missing-values.php @@ -2,6 +2,8 @@ /** * Gravity Perks // Populate Anything // Require Filter Groups to have all values present. * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ + * + * Experimental Snippet πŸ§ͺ */ add_filter( 'gppa_object_type_post_filter', function( $query_builder_args, $args ) { /** From 4847ee1dab32156801d3f2710e2fd26ede4e4282 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:54 -0600 Subject: [PATCH 42/82] `gppa-select-all-checkboxes.js`: Migrated from experimental folder. --- .../gppa-select-all-checkboxes.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-select-all-checkboxes.js (96%) diff --git a/experimental/gppa-select-all-checkboxes.js b/gp-populate-anything/gppa-select-all-checkboxes.js similarity index 96% rename from experimental/gppa-select-all-checkboxes.js rename to gp-populate-anything/gppa-select-all-checkboxes.js index 80c2ec337..700fbc8e8 100644 --- a/experimental/gppa-select-all-checkboxes.js +++ b/gp-populate-anything/gppa-select-all-checkboxes.js @@ -2,6 +2,8 @@ * Gravity Perks // GP Populate Anything // Automatically Check Checkboxes * http://gravitywiz.com/documentation/gravity-forms-populate-anything * + * Experimental Snippet πŸ§ͺ + * * Instructions: * 1. Install our free Custom Javascript for Gravity Forms plugin. * Download the plugin here: https://gravitywiz.com/gravity-forms-code-chest/ From 68fb50e16f72ddd49d11fd90123697feadc29bb6 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:54 -0600 Subject: [PATCH 43/82] `gppa-simply-schedule-appointments-refresh-lmts.js`: Migrated from experimental folder. --- .../gppa-simply-schedule-appointments-refresh-lmts.js | 1 + 1 file changed, 1 insertion(+) rename {experimental => gp-populate-anything}/gppa-simply-schedule-appointments-refresh-lmts.js (97%) diff --git a/experimental/gppa-simply-schedule-appointments-refresh-lmts.js b/gp-populate-anything/gppa-simply-schedule-appointments-refresh-lmts.js similarity index 97% rename from experimental/gppa-simply-schedule-appointments-refresh-lmts.js rename to gp-populate-anything/gppa-simply-schedule-appointments-refresh-lmts.js index 99adbd1ab..91006b985 100644 --- a/experimental/gppa-simply-schedule-appointments-refresh-lmts.js +++ b/gp-populate-anything/gppa-simply-schedule-appointments-refresh-lmts.js @@ -1,4 +1,5 @@ /** + * Experimental Snippet πŸ§ͺ * --- STOP! --- * * This snippet is deprecated and no longer required if you are using the latest version of Simply Schedule Appointments. From 38f5e61bb43ba02b691d5d63331dd96b874f2d13 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:54 -0600 Subject: [PATCH 44/82] `gppa-wc-country-to-gf-address-field.php`: Migrated from experimental folder. --- .../gppa-wc-country-to-gf-address-field.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-wc-country-to-gf-address-field.php (95%) diff --git a/experimental/gppa-wc-country-to-gf-address-field.php b/gp-populate-anything/gppa-wc-country-to-gf-address-field.php similarity index 95% rename from experimental/gppa-wc-country-to-gf-address-field.php rename to gp-populate-anything/gppa-wc-country-to-gf-address-field.php index 063f8c9d8..870fa1284 100644 --- a/experimental/gppa-wc-country-to-gf-address-field.php +++ b/gp-populate-anything/gppa-wc-country-to-gf-address-field.php @@ -2,6 +2,8 @@ /** * Gravity Perks // Populate Anything // Populate Country from WooCommerce into Gravity Forms Address field * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ + * + * Experimental Snippet πŸ§ͺ */ // Update "26" to your Address field ID. Leave the ".6" alone. add_filter( 'gppa_process_template_26.6', function( $template_value, $field, $template_name, $populate, $object, $object_type, $objects, $template ) { From cbe6b033484c4f82f3cb8e4c0ce2e82dfff8688e Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:54 -0600 Subject: [PATCH 45/82] `gppa-woo-commerce-lmt.php`: Migrated from experimental folder. --- .../gppa-woo-commerce-lmt.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-populate-anything}/gppa-woo-commerce-lmt.php (96%) diff --git a/experimental/gppa-woo-commerce-lmt.php b/gp-populate-anything/gppa-woo-commerce-lmt.php similarity index 96% rename from experimental/gppa-woo-commerce-lmt.php rename to gp-populate-anything/gppa-woo-commerce-lmt.php index e5bbdccc9..6ae71a466 100644 --- a/experimental/gppa-woo-commerce-lmt.php +++ b/gp-populate-anything/gppa-woo-commerce-lmt.php @@ -2,6 +2,8 @@ /** * This snippet enables LMT usage in WooCommerce cart pages. * See: https://secure.helpscout.net/conversation/1520295750/24633?folderId=3808239 + * + * Experimental Snippet πŸ§ͺ */ add_action( 'wp', function() { if ( ! function_exists( 'WC' ) || ( ! is_cart() && ! is_checkout() ) ) { From a3d9fe50f2cac4bbc94cf3e427999ad76be4e8d9 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:54 -0600 Subject: [PATCH 46/82] `gprf-reload-globally.js`: Migrated from experimental folder. --- {experimental => gp-reload-form}/gprf-reload-globally.js | 1 + 1 file changed, 1 insertion(+) rename {experimental => gp-reload-form}/gprf-reload-globally.js (95%) diff --git a/experimental/gprf-reload-globally.js b/gp-reload-form/gprf-reload-globally.js similarity index 95% rename from experimental/gprf-reload-globally.js rename to gp-reload-form/gprf-reload-globally.js index 891c734cf..1ff947d6c 100644 --- a/experimental/gprf-reload-globally.js +++ b/gp-reload-form/gprf-reload-globally.js @@ -1,4 +1,5 @@ /** + * Experimental Snippet πŸ§ͺ * By default, GPRF scopes it's replacement to a static container. If the user is including multiple instances of the same form * on the same page (which GF does not support by default), all instances of the form will be submitted but only the submitted * instance will be reloaded. Use this snippet to reload all forms of the same ID. From 707588b119e654be9d688088ad90b74ed4f849a2 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:54 -0600 Subject: [PATCH 47/82] `gpuid-belgium-cipher.php`: Migrated from experimental folder. --- {experimental => gp-unique-id}/gpuid-belgium-cipher.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gp-unique-id}/gpuid-belgium-cipher.php (97%) diff --git a/experimental/gpuid-belgium-cipher.php b/gp-unique-id/gpuid-belgium-cipher.php similarity index 97% rename from experimental/gpuid-belgium-cipher.php rename to gp-unique-id/gpuid-belgium-cipher.php index 05e89ee1e..72d525f79 100644 --- a/experimental/gpuid-belgium-cipher.php +++ b/gp-unique-id/gpuid-belgium-cipher.php @@ -3,6 +3,8 @@ * Gravity Perks // Unique ID // Generate Belgium Cipher * https://gravitywiz.com/documentation/gravity-forms-unique-id/ * + * Experimental Snippet πŸ§ͺ + * * Instructions: * * 1. Copy and paste this code into your theme's functions.php file or wherever you include custom PHP snippets. From c83718e94f51b1c6e5c3949e51a43415e58563ee Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:55 -0600 Subject: [PATCH 48/82] `gpuid-clear-index.php`: Migrated from experimental folder. --- {experimental => gp-unique-id}/gpuid-clear-index.php | 1 + 1 file changed, 1 insertion(+) rename {experimental => gp-unique-id}/gpuid-clear-index.php (98%) diff --git a/experimental/gpuid-clear-index.php b/gp-unique-id/gpuid-clear-index.php similarity index 98% rename from experimental/gpuid-clear-index.php rename to gp-unique-id/gpuid-clear-index.php index 7645f404e..deaee7d3b 100644 --- a/experimental/gpuid-clear-index.php +++ b/gp-unique-id/gpuid-clear-index.php @@ -1,5 +1,6 @@ Date: Tue, 7 Jan 2025 10:38:55 -0600 Subject: [PATCH 49/82] `gpuid-custom-format-ABC12345.php`: Migrated from experimental folder. --- .../gpuid-custom-format-ABC12345.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename {experimental => gp-unique-id}/gpuid-custom-format-ABC12345.php (90%) diff --git a/experimental/gpuid-custom-format-ABC12345.php b/gp-unique-id/gpuid-custom-format-ABC12345.php similarity index 90% rename from experimental/gpuid-custom-format-ABC12345.php rename to gp-unique-id/gpuid-custom-format-ABC12345.php index b3ed38c26..8daea19db 100644 --- a/experimental/gpuid-custom-format-ABC12345.php +++ b/gp-unique-id/gpuid-custom-format-ABC12345.php @@ -1,7 +1,9 @@ - Date: Tue, 7 Jan 2025 10:38:55 -0600 Subject: [PATCH 50/82] `gpwc-limit-line-breaks.js`: Migrated from experimental folder. --- {experimental => gp-word-count}/gpwc-limit-line-breaks.js | 3 +++ 1 file changed, 3 insertions(+) rename {experimental => gp-word-count}/gpwc-limit-line-breaks.js (93%) diff --git a/experimental/gpwc-limit-line-breaks.js b/gp-word-count/gpwc-limit-line-breaks.js similarity index 93% rename from experimental/gpwc-limit-line-breaks.js rename to gp-word-count/gpwc-limit-line-breaks.js index fe2028b11..ee02dea6e 100644 --- a/experimental/gpwc-limit-line-breaks.js +++ b/gp-word-count/gpwc-limit-line-breaks.js @@ -1,3 +1,6 @@ +/** + * Experimental Snippet πŸ§ͺ + */ // Limit the number of line breaks allowed in a GPWC field var form_id = 553; // Update this to the form ID var field_id = 1; // Update this to the field ID From 49c1269fc7b14be5de272f157db786b4f7d2145d Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:55 -0600 Subject: [PATCH 51/82] `gspc-remove-wc-product-from-entry-order-summary.php`: Migrated from experimental folder. --- .../gspc-remove-wc-product-from-entry-order-summary.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gs-product-configurator}/gspc-remove-wc-product-from-entry-order-summary.php (94%) diff --git a/experimental/gspc-remove-wc-product-from-entry-order-summary.php b/gs-product-configurator/gspc-remove-wc-product-from-entry-order-summary.php similarity index 94% rename from experimental/gspc-remove-wc-product-from-entry-order-summary.php rename to gs-product-configurator/gspc-remove-wc-product-from-entry-order-summary.php index 2bf009619..07a077d30 100644 --- a/experimental/gspc-remove-wc-product-from-entry-order-summary.php +++ b/gs-product-configurator/gspc-remove-wc-product-from-entry-order-summary.php @@ -2,6 +2,8 @@ /** * Gravity Shop // Product Configurator // Remove WC Product from Entry Order Summary * https://gravitywiz.com/documentation/gs-product-configurator/ + * + * Experimental Snippet πŸ§ͺ */ add_filter( 'init', function() { if ( is_callable( 'gs_product_configurator' ) ) { From 3bafa7416b0c9646aa9abcf10d1a0a07db75abf3 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:55 -0600 Subject: [PATCH 52/82] `gspc-set-subscription-length-by-field-value.php`: Migrated from experimental folder. --- .../gspc-set-subscription-length-by-field-value.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gs-product-configurator}/gspc-set-subscription-length-by-field-value.php (97%) diff --git a/experimental/gspc-set-subscription-length-by-field-value.php b/gs-product-configurator/gspc-set-subscription-length-by-field-value.php similarity index 97% rename from experimental/gspc-set-subscription-length-by-field-value.php rename to gs-product-configurator/gspc-set-subscription-length-by-field-value.php index af437ddca..c2de05a6a 100644 --- a/experimental/gspc-set-subscription-length-by-field-value.php +++ b/gs-product-configurator/gspc-set-subscription-length-by-field-value.php @@ -2,6 +2,8 @@ /** * Gravity Shop // Product Configurator // Set Subscription Length by Field Value * https://gravitywiz.com/documentation/gravity-shop-product-configurator/ + * + * Experimental Snippet πŸ§ͺ */ add_action( 'woocommerce_checkout_create_subscription', function ( $subscription ) { From f818b1ba5b4c9a6e7f533b837483f27b1d209e4b Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:56 -0600 Subject: [PATCH 53/82] `gw-add-attachments-by-field.php`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-add-attachments-by-field.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-add-attachments-by-field.php (98%) diff --git a/experimental/gw-add-attachments-by-field.php b/gravity-forms/gw-add-attachments-by-field.php similarity index 98% rename from experimental/gw-add-attachments-by-field.php rename to gravity-forms/gw-add-attachments-by-field.php index 98c03c066..131d2e185 100644 --- a/experimental/gw-add-attachments-by-field.php +++ b/gravity-forms/gw-add-attachments-by-field.php @@ -3,6 +3,8 @@ * Gravity Wiz // Gravity Forms // Add Attachments by Field * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Gravity Forms provides an option to add all uploaded files as attachments but it does not provide the ability to * choose which fields to attach. This snippet allows you to attach a specific field's uploaded files to a specific * notification by name and field ID. From bdb6ca2804a78f9296d78b6d8f6dfe77e09a865b Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:56 -0600 Subject: [PATCH 54/82] `gw-add-custom-footer-button.php`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-add-custom-footer-button.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-add-custom-footer-button.php (93%) diff --git a/experimental/gw-add-custom-footer-button.php b/gravity-forms/gw-add-custom-footer-button.php similarity index 93% rename from experimental/gw-add-custom-footer-button.php rename to gravity-forms/gw-add-custom-footer-button.php index 1b7d8aa9c..7c2b33b08 100644 --- a/experimental/gw-add-custom-footer-button.php +++ b/gravity-forms/gw-add-custom-footer-button.php @@ -2,6 +2,8 @@ /** * Gravity Wiz // Gravity Forms // Add Custom Footer Button after Save & Continue * https://gravitywiz.com/ + * + * Experimental Snippet πŸ§ͺ */ // Update "123" to your form ID. add_filter( 'gform_savecontinue_link_123', function( $markup, $form ) { From 2b727d540b202fa7b257cca7064c608e1cf0b560 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:56 -0600 Subject: [PATCH 55/82] `gw-auto-prepend-https.js`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-auto-prepend-https.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-auto-prepend-https.js (94%) diff --git a/experimental/gw-auto-prepend-https.js b/gravity-forms/gw-auto-prepend-https.js similarity index 94% rename from experimental/gw-auto-prepend-https.js rename to gravity-forms/gw-auto-prepend-https.js index 8840191c1..801c4fe98 100644 --- a/experimental/gw-auto-prepend-https.js +++ b/gravity-forms/gw-auto-prepend-https.js @@ -2,6 +2,8 @@ * Gravity Wiz // Gravity Forms // Auto-prepend HTTPS to URLs * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Auto-prepend "https://" to URLs in Website fields. */ // Update "1" to your field ID. From c42036dd502815655dbfd1dfb5e23cec67c66c7b Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:56 -0600 Subject: [PATCH 56/82] `gw-capture-file-extension.php`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-capture-file-extension.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-capture-file-extension.php (96%) diff --git a/experimental/gw-capture-file-extension.php b/gravity-forms/gw-capture-file-extension.php similarity index 96% rename from experimental/gw-capture-file-extension.php rename to gravity-forms/gw-capture-file-extension.php index f942ae615..b20594d4a 100644 --- a/experimental/gw-capture-file-extension.php +++ b/gravity-forms/gw-capture-file-extension.php @@ -3,6 +3,8 @@ * Gravity Wiz // Gravity Forms // Capture File Extension * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Capture the file extension of any file uploaded into a File Upload field on submission. * This only works with single File Upload fields. * From 0101557564f93da057d32a54cdee1b4847712478 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:56 -0600 Subject: [PATCH 57/82] `gw-capture-filename.js`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-capture-filename.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-capture-filename.js (96%) diff --git a/experimental/gw-capture-filename.js b/gravity-forms/gw-capture-filename.js similarity index 96% rename from experimental/gw-capture-filename.js rename to gravity-forms/gw-capture-filename.js index 603adc0ac..ecf14768d 100644 --- a/experimental/gw-capture-filename.js +++ b/gravity-forms/gw-capture-filename.js @@ -2,6 +2,8 @@ * Gravity Wiz // Gravity Forms // Capture Filename from Single File Upload Field * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Instruction Video: https://www.loom.com/share/294728eabe244fe8aba72b051155b4d7 * * * Installation: From fdc21d893fc056ef18a81215b7746d2eb5ad22d9 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:56 -0600 Subject: [PATCH 58/82] `gw-capture-list-field-column-as-comma-delimited-list.php`: Migrated from experimental folder. --- .../gw-capture-list-field-column-as-comma-delimited-list.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-capture-list-field-column-as-comma-delimited-list.php (96%) diff --git a/experimental/gw-capture-list-field-column-as-comma-delimited-list.php b/gravity-forms/gw-capture-list-field-column-as-comma-delimited-list.php similarity index 96% rename from experimental/gw-capture-list-field-column-as-comma-delimited-list.php rename to gravity-forms/gw-capture-list-field-column-as-comma-delimited-list.php index bf1b1a45a..e5ea3cf6b 100644 --- a/experimental/gw-capture-list-field-column-as-comma-delimited-list.php +++ b/gravity-forms/gw-capture-list-field-column-as-comma-delimited-list.php @@ -2,6 +2,8 @@ /** * Gravity Wiz // Gravity Forms // Capture List Field Column as Comma-delimited List * https://gravitywiz.com/ + * + * Experimental Snippet πŸ§ͺ */ // Update "123" to your form ID. add_action( 'gform_pre_submission_123', function( $form ) { From 371cb7ea494de75b51ff058ccee7a62dabb53506 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:57 -0600 Subject: [PATCH 59/82] `gw-checkbox-to-list-field.js`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-checkbox-to-list-field.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-checkbox-to-list-field.js (97%) diff --git a/experimental/gw-checkbox-to-list-field.js b/gravity-forms/gw-checkbox-to-list-field.js similarity index 97% rename from experimental/gw-checkbox-to-list-field.js rename to gravity-forms/gw-checkbox-to-list-field.js index c191fd813..b52b7533d 100644 --- a/experimental/gw-checkbox-to-list-field.js +++ b/gravity-forms/gw-checkbox-to-list-field.js @@ -2,6 +2,8 @@ * Gravity Wiz // Gravity Forms // Checkbox to List Field * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * When a Checkbox is clicked, add a new row to a List field with the checkbox value as the value in the first column * of the newly added row. */ From 1a6327a8d0aea7303db1a1c497e6618874799f4f Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:57 -0600 Subject: [PATCH 60/82] `gw-count-sundays.js`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-count-sundays.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-count-sundays.js (98%) diff --git a/experimental/gw-count-sundays.js b/gravity-forms/gw-count-sundays.js similarity index 98% rename from experimental/gw-count-sundays.js rename to gravity-forms/gw-count-sundays.js index b6d7ab481..3c087fa03 100644 --- a/experimental/gw-count-sundays.js +++ b/gravity-forms/gw-count-sundays.js @@ -2,6 +2,8 @@ * Gravity Wiz // Gravity Forms // Count Number of Sundays Between Two Dates * https://gravitywiz.com/path/to/article/ * + * Experimental Snippet πŸ§ͺ + * * Use this snippet to count the number of Sundays between a start and end date, including those dates themselves. * * Note: This is a JavaScript snippet and there is no server-side validation to ensure that the calculated value From 18ba84568865cb14e5e8304c50349d5772ad569e Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:57 -0600 Subject: [PATCH 61/82] `gw-crazy-snippet.php`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-crazy-snippet.php | 3 +++ 1 file changed, 3 insertions(+) rename {experimental => gravity-forms}/gw-crazy-snippet.php (76%) diff --git a/experimental/gw-crazy-snippet.php b/gravity-forms/gw-crazy-snippet.php similarity index 76% rename from experimental/gw-crazy-snippet.php rename to gravity-forms/gw-crazy-snippet.php index 427b73b74..591c83b1d 100644 --- a/experimental/gw-crazy-snippet.php +++ b/gravity-forms/gw-crazy-snippet.php @@ -1,4 +1,7 @@ Date: Tue, 7 Jan 2025 10:38:57 -0600 Subject: [PATCH 62/82] `gw-create-extra-entry.php`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-create-extra-entry.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-create-extra-entry.php (94%) diff --git a/experimental/gw-create-extra-entry.php b/gravity-forms/gw-create-extra-entry.php similarity index 94% rename from experimental/gw-create-extra-entry.php rename to gravity-forms/gw-create-extra-entry.php index 46d8713f8..eae3d280c 100644 --- a/experimental/gw-create-extra-entry.php +++ b/gravity-forms/gw-create-extra-entry.php @@ -3,6 +3,8 @@ * Gravity Wiz // Gravity Forms // Create an Extra Entry if Checkbox is Checked * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Create an additional entry identical to the first if a specified checkbox is checked. * * @see https://stackoverflow.com/a/69497108/227711 From f695bcd2eec378a1f05fd7cb434adac83c837041 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:57 -0600 Subject: [PATCH 63/82] `gw-delete-entries-when-user-deleted.php`: Migrated from experimental folder. --- .../gw-delete-entries-when-user-deleted.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-delete-entries-when-user-deleted.php (97%) diff --git a/experimental/gw-delete-entries-when-user-deleted.php b/gravity-forms/gw-delete-entries-when-user-deleted.php similarity index 97% rename from experimental/gw-delete-entries-when-user-deleted.php rename to gravity-forms/gw-delete-entries-when-user-deleted.php index 540825c13..9a2b6ded9 100644 --- a/experimental/gw-delete-entries-when-user-deleted.php +++ b/gravity-forms/gw-delete-entries-when-user-deleted.php @@ -3,6 +3,8 @@ * Gravity Wiz // Gravity Forms // Delete User's Entries When User Deleted * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Automatically delete all of a user's entries across all forms when the user is deleted. If the user's content is * reassigned to another user, their entries will be reassigned to the same user rather than deleted. * From d2dcf9cb8d72c8592ac900dff4eaed74d24b73e5 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:57 -0600 Subject: [PATCH 64/82] `gw-field-ids-in-editor-labels.php`: Migrated from experimental folder. --- .../gw-field-ids-in-editor-labels.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-field-ids-in-editor-labels.php (97%) diff --git a/experimental/gw-field-ids-in-editor-labels.php b/gravity-forms/gw-field-ids-in-editor-labels.php similarity index 97% rename from experimental/gw-field-ids-in-editor-labels.php rename to gravity-forms/gw-field-ids-in-editor-labels.php index 11a3bde7b..302828aaa 100644 --- a/experimental/gw-field-ids-in-editor-labels.php +++ b/gravity-forms/gw-field-ids-in-editor-labels.php @@ -3,6 +3,8 @@ * Gravity Wiz // Gravity Forms // Display Field IDs Next to Field Labels in the Editor * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Instruction Video: https://www.loom.com/share/0268993d0b6c429ba50686bd740093bc * */ From 1c6597d0f55c8381f18f4bbda347f65e825ac0a8 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:58 -0600 Subject: [PATCH 65/82] `gw-force-greater-end-time.js`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-force-greater-end-time.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-force-greater-end-time.js (98%) diff --git a/experimental/gw-force-greater-end-time.js b/gravity-forms/gw-force-greater-end-time.js similarity index 98% rename from experimental/gw-force-greater-end-time.js rename to gravity-forms/gw-force-greater-end-time.js index f64877d9d..2b9a4d3e0 100644 --- a/experimental/gw-force-greater-end-time.js +++ b/gravity-forms/gw-force-greater-end-time.js @@ -2,6 +2,8 @@ * Gravity Wiz // Gravity Forms // Force Greater End Time. * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Force the user to enter an end time greater than the start time. * * Instructions: From 0cd754b4c12425b07b196b1bda32edbdc8b697d8 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:58 -0600 Subject: [PATCH 66/82] `gw-force-numeric-keyboard-on-mobile.php`: Migrated from experimental folder. --- .../gw-force-numeric-keyboard-on-mobile.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-force-numeric-keyboard-on-mobile.php (95%) diff --git a/experimental/gw-force-numeric-keyboard-on-mobile.php b/gravity-forms/gw-force-numeric-keyboard-on-mobile.php similarity index 95% rename from experimental/gw-force-numeric-keyboard-on-mobile.php rename to gravity-forms/gw-force-numeric-keyboard-on-mobile.php index 7fdaab0c6..d4661ebaf 100644 --- a/experimental/gw-force-numeric-keyboard-on-mobile.php +++ b/gravity-forms/gw-force-numeric-keyboard-on-mobile.php @@ -3,6 +3,8 @@ * Gravity Wiz // Gravity Forms // Force Numeric Keyboard for Number Fields on Mobile * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * This snippet forces the numeric keyboard for Number fields on mobile devices by updating the "type" attribute of the * input to "tel" instead of "number". If you find there are any drawbacks to this approach, let us know! * From 27bb6feb8442339156b1532c8a351446d1bc3b6b Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:58 -0600 Subject: [PATCH 67/82] `gw-gfapc-map-multiple-fields-to-taxonomy.php`: Migrated from experimental folder. --- .../gw-gfapc-map-multiple-fields-to-taxonomy.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-gfapc-map-multiple-fields-to-taxonomy.php (97%) diff --git a/experimental/gw-gfapc-map-multiple-fields-to-taxonomy.php b/gravity-forms/gw-gfapc-map-multiple-fields-to-taxonomy.php similarity index 97% rename from experimental/gw-gfapc-map-multiple-fields-to-taxonomy.php rename to gravity-forms/gw-gfapc-map-multiple-fields-to-taxonomy.php index 24fbf3b23..c151602e3 100644 --- a/experimental/gw-gfapc-map-multiple-fields-to-taxonomy.php +++ b/gravity-forms/gw-gfapc-map-multiple-fields-to-taxonomy.php @@ -3,6 +3,8 @@ * Gravity Wiz // Gravity Forms // Map Multiple Fields w/ Advanced Post Creation * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * By default, the Advanced Post Creation add-on does not allow you to map multiple fields to a taxonomy nor does it * allow you to set terms by ID. * From 18c1b7dc1400a9d7fe47c7d958ccfa696fd390ee Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:58 -0600 Subject: [PATCH 68/82] `gw-gravity-forms-to-wp-job-manager.php`: Migrated from experimental folder. --- .../gw-gravity-forms-to-wp-job-manager.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-gravity-forms-to-wp-job-manager.php (97%) diff --git a/experimental/gw-gravity-forms-to-wp-job-manager.php b/gravity-forms/gw-gravity-forms-to-wp-job-manager.php similarity index 97% rename from experimental/gw-gravity-forms-to-wp-job-manager.php rename to gravity-forms/gw-gravity-forms-to-wp-job-manager.php index 0f34a07c8..ccbef5ed9 100644 --- a/experimental/gw-gravity-forms-to-wp-job-manager.php +++ b/gravity-forms/gw-gravity-forms-to-wp-job-manager.php @@ -3,6 +3,8 @@ * Gravity Wiz // Gravity Forms // Populate GF Data into WP Job Manager Custom Fields * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Provides support for mapping a GF multiselect field to a WPJM multiselect field. */ class GW_GF_To_WP_Job_Manager { From 2c6039812cbc6a311b0805115c2708e7b732785a Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:58 -0600 Subject: [PATCH 69/82] `gw-live-field-values-post-submission.php`: Migrated from experimental folder. --- .../gw-live-field-values-post-submission.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-live-field-values-post-submission.php (96%) diff --git a/experimental/gw-live-field-values-post-submission.php b/gravity-forms/gw-live-field-values-post-submission.php similarity index 96% rename from experimental/gw-live-field-values-post-submission.php rename to gravity-forms/gw-live-field-values-post-submission.php index 7a41cdfc4..ea4ee90ac 100644 --- a/experimental/gw-live-field-values-post-submission.php +++ b/gravity-forms/gw-live-field-values-post-submission.php @@ -2,6 +2,8 @@ /** * Gravity Wiz // Gravity Forms // Live Field Values Post-submission * https://gravitywiz.com/ + * + * Experimental Snippet πŸ§ͺ */ // Update "123" to your form ID and "4" to your field ID. add_filter( 'gform_get_input_value_123_4', function( $value, $entry ) { From 9ff9b6c97528a8766255c3b2c5bfb2f526ade565 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:58 -0600 Subject: [PATCH 70/82] `gw-minimum-file-count.php`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-minimum-file-count.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-minimum-file-count.php (97%) diff --git a/experimental/gw-minimum-file-count.php b/gravity-forms/gw-minimum-file-count.php similarity index 97% rename from experimental/gw-minimum-file-count.php rename to gravity-forms/gw-minimum-file-count.php index 1ddcbeb09..164fa22ea 100644 --- a/experimental/gw-minimum-file-count.php +++ b/gravity-forms/gw-minimum-file-count.php @@ -2,6 +2,8 @@ /** * Gravity Wiz // Gravity Forms // Require a minimum number of files in multi file uploader * https://gravitywiz.com/ + * + * Experimental Snippet πŸ§ͺ */ add_filter( 'gform_validation', function ( $result ) { $form = $result['form']; From c21520bf6b22122e79caa27a073fafff32498eec Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:59 -0600 Subject: [PATCH 71/82] `gw-prevent-duplicate-drop-down-selections.js`: Migrated from experimental folder. --- .../gw-prevent-duplicate-drop-down-selections.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-prevent-duplicate-drop-down-selections.js (86%) diff --git a/experimental/gw-prevent-duplicate-drop-down-selections.js b/gravity-forms/gw-prevent-duplicate-drop-down-selections.js similarity index 86% rename from experimental/gw-prevent-duplicate-drop-down-selections.js rename to gravity-forms/gw-prevent-duplicate-drop-down-selections.js index 1c4b9cbdf..a675eb1ea 100644 --- a/experimental/gw-prevent-duplicate-drop-down-selections.js +++ b/gravity-forms/gw-prevent-duplicate-drop-down-selections.js @@ -2,4 +2,6 @@ * This snippet has evolved! πŸ¦„ * Find the new version of this snippet here: * https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-prevent-duplicate-selections.js + * + * Experimental Snippet πŸ§ͺ */ From df90b3fd6abb3ee257f9ac86479243aa8b9d7df2 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:59 -0600 Subject: [PATCH 72/82] `gw-prevent-non-numeric-chars.js`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-prevent-non-numeric-chars.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-prevent-non-numeric-chars.js (95%) diff --git a/experimental/gw-prevent-non-numeric-chars.js b/gravity-forms/gw-prevent-non-numeric-chars.js similarity index 95% rename from experimental/gw-prevent-non-numeric-chars.js rename to gravity-forms/gw-prevent-non-numeric-chars.js index 4bed0a30a..eefc9e61d 100644 --- a/experimental/gw-prevent-non-numeric-chars.js +++ b/gravity-forms/gw-prevent-non-numeric-chars.js @@ -2,6 +2,8 @@ * Gravity Wiz // Gravity Forms // Prevent Non-numeric Characters in Input * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Based on solution provided here: https://stackoverflow.com/a/15729184/227711 * * Instructions: From 93205a6bb4d53023b74bbc4f3bd117712b7fb787 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:59 -0600 Subject: [PATCH 73/82] `gw-preview-mode-tweaks.php`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-preview-mode-tweaks.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-preview-mode-tweaks.php (97%) diff --git a/experimental/gw-preview-mode-tweaks.php b/gravity-forms/gw-preview-mode-tweaks.php similarity index 97% rename from experimental/gw-preview-mode-tweaks.php rename to gravity-forms/gw-preview-mode-tweaks.php index c7e0f65dd..65c9049e5 100644 --- a/experimental/gw-preview-mode-tweaks.php +++ b/gravity-forms/gw-preview-mode-tweaks.php @@ -4,6 +4,8 @@ * * Instruction Video: https://www.loom.com/share/3a42b0ba7452424c8dbde1fc4988a5d0 * + * Experimental Snippet πŸ§ͺ + * * This snippet allows you to tweak the CSS styles when using Gravity Forms Preview Mode. */ add_action( 'gform_preview_footer', function() { From acf60abad8e0f3e00383f5596487031634407f63 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:59 -0600 Subject: [PATCH 74/82] `gw-require-house-number-in-address.php`: Migrated from experimental folder. --- .../gw-require-house-number-in-address.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-require-house-number-in-address.php (96%) diff --git a/experimental/gw-require-house-number-in-address.php b/gravity-forms/gw-require-house-number-in-address.php similarity index 96% rename from experimental/gw-require-house-number-in-address.php rename to gravity-forms/gw-require-house-number-in-address.php index ba578d671..4e1a59111 100644 --- a/experimental/gw-require-house-number-in-address.php +++ b/gravity-forms/gw-require-house-number-in-address.php @@ -3,6 +3,8 @@ * Gravity Wiz // Gravity Forms // Require a house number in a submitted address * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Instructions: * * See https://gravitywiz.com/documentation/how-do-i-install-a-snippet/ * * Customize FORMID and FIELDID accordingly. From 236885508e8a7f448c19fabf9148e42f0870a401 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:59 -0600 Subject: [PATCH 75/82] `gw-rich-text-html-fields.php`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-rich-text-html-fields.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-rich-text-html-fields.php (98%) diff --git a/experimental/gw-rich-text-html-fields.php b/gravity-forms/gw-rich-text-html-fields.php similarity index 98% rename from experimental/gw-rich-text-html-fields.php rename to gravity-forms/gw-rich-text-html-fields.php index 7d5d0b563..0bbbe0671 100644 --- a/experimental/gw-rich-text-html-fields.php +++ b/gravity-forms/gw-rich-text-html-fields.php @@ -3,6 +3,8 @@ * Gravity Wiz // Gravity Forms // Rich Text HTML Fields * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Demo Video: https://www.loom.com/share/fc666b9d3e1f48ed9dc21a3fcadef783 * * @todo From 6fa0ccd34ff2891adeecff300c2cb987a31a9fc0 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:59 -0600 Subject: [PATCH 76/82] `gw-round-total.js`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-round-total.js | 3 +++ 1 file changed, 3 insertions(+) rename {experimental => gravity-forms}/gw-round-total.js (88%) diff --git a/experimental/gw-round-total.js b/gravity-forms/gw-round-total.js similarity index 88% rename from experimental/gw-round-total.js rename to gravity-forms/gw-round-total.js index f53a55ebe..e8f1c2af9 100644 --- a/experimental/gw-round-total.js +++ b/gravity-forms/gw-round-total.js @@ -1,3 +1,6 @@ +/** + * Experimental Snippet πŸ§ͺ + */ // Round the total field gform.addFilter( 'gform_product_total', function(total, formId){ var interval = 1; // Change this to the nearest percision (e.g. 10 rounds to the nearest 10,20,30... etc.) From 999a2d2f46aa2c42d566d8dec29f6a6965b075d3 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:38:59 -0600 Subject: [PATCH 77/82] `gw-use-html5-datepicker.js`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-use-html5-datepicker.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-use-html5-datepicker.js (96%) diff --git a/experimental/gw-use-html5-datepicker.js b/gravity-forms/gw-use-html5-datepicker.js similarity index 96% rename from experimental/gw-use-html5-datepicker.js rename to gravity-forms/gw-use-html5-datepicker.js index 09d6bfd54..9dc8f89fc 100644 --- a/experimental/gw-use-html5-datepicker.js +++ b/gravity-forms/gw-use-html5-datepicker.js @@ -8,6 +8,8 @@ * Instructions: * 1. Install our free Custom JavaScript for Gravity Forms plugin. * Download the plugin here: https://gravitywiz.com/gravity-forms-code-chest/ + * + * Experimental Snippet πŸ§ͺ * 2. Copy and paste the snippet into the editor of the Custom Javascript for Gravity Forms plugin. */ From b52ff65f08fed01e526ff942ba1c08df35c43598 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:39:00 -0600 Subject: [PATCH 78/82] `gw-validate-postcode.php`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-validate-postcode.php | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-validate-postcode.php (96%) diff --git a/experimental/gw-validate-postcode.php b/gravity-forms/gw-validate-postcode.php similarity index 96% rename from experimental/gw-validate-postcode.php rename to gravity-forms/gw-validate-postcode.php index d44d2f78f..dc5686a0a 100644 --- a/experimental/gw-validate-postcode.php +++ b/gravity-forms/gw-validate-postcode.php @@ -3,6 +3,8 @@ * Gravity Wiz // Gravity Forms // Validate Postcode * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Check to confirm if the postcode entered into the Address field is a valid postcode. * Currently limited to UK postcodes. If you need support for another country, let us * know [via support](https://gravitywiz.com/support/). From 8f3f5a82a63e106bfeb6da78a6f231c5a558f239 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:39:00 -0600 Subject: [PATCH 79/82] `gw-value-counter.js`: Migrated from experimental folder. --- {experimental => gravity-forms}/gw-value-counter.js | 2 ++ 1 file changed, 2 insertions(+) rename {experimental => gravity-forms}/gw-value-counter.js (97%) diff --git a/experimental/gw-value-counter.js b/gravity-forms/gw-value-counter.js similarity index 97% rename from experimental/gw-value-counter.js rename to gravity-forms/gw-value-counter.js index 9a18de034..d1f0491d3 100644 --- a/experimental/gw-value-counter.js +++ b/gravity-forms/gw-value-counter.js @@ -2,6 +2,8 @@ * Gravity Wiz // Gravity Forms // Value Counter * https://gravitywiz.com/ * + * Experimental Snippet πŸ§ͺ + * * Count the number of times a given value has been selected in a group of fields and populate that number into a Number field. * This snippet is designed to target a Number field and count selected values in Checkbox and Radio Button fields. * From 37a27d2199cd4d771f5f0a1121e11f41bef5b006 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:39:52 -0600 Subject: [PATCH 80/82] Formatting: Added placeholder files to `experimental` for snippets that were migrated out. --- experimental/gfjs-early-init-scripts.php | 6 ++++++ experimental/gfsa-auto-allow-administrator-access.php | 6 ++++++ experimental/gpdec-delay-for-gravity-pdf-bg-processing.php | 6 ++++++ experimental/gpdtc-calculated-input-value.php | 6 ++++++ experimental/gpi-auto-selections.php | 6 ++++++ .../gpi-copy-exhausted-inventory-to-another-field.js | 5 +++++ ...clude-child-entries-when-attached-to-a-partial-entry.php | 6 ++++++ experimental/gpi-packaged-products.php | 6 ++++++ experimental/gpnf-comma-delimited-email-list.php | 6 ++++++ experimental/gpnf-count-answered-child-fields.js | 5 +++++ experimental/gpnf-delete-expired-orphans.php | 6 ++++++ ...lude-gf-inline-scripts-from-cloudflare-rocket-loader.php | 6 ++++++ experimental/gpnf-gravity-view-values.php | 6 ++++++ experimental/gpnf-gv-duplicate-child-entries.php | 6 ++++++ experimental/gpnf-lock-child-entries-by-date.php | 6 ++++++ experimental/gpnf-modify-display-value-by-date.php | 6 ++++++ .../gpnf-parent-form-field-values-in-child-form-filters.php | 6 ++++++ experimental/gpnf-preserve-child-entry-created-by.php | 6 ++++++ experimental/gpnf-restore-default-value-on-edit.php | 6 ++++++ experimental/gpnf-sortable-entries.php | 6 ++++++ .../gppa-acf-populate-multiple-items-from-repeater-row.php | 6 ++++++ experimental/gppa-click-image-choice-image-wrapper.js | 5 +++++ experimental/gppa-conditional-logic-when-no-results.js | 5 +++++ .../gppa-conditionally-exclude-filter-by-field-value.php | 6 ++++++ experimental/gppa-enable-choice-values-for-gravity-view.php | 6 ++++++ experimental/gppa-faceted-filters.php | 6 ++++++ experimental/gppa-filter-entries-by-time-field.php | 6 ++++++ experimental/gppa-firefox-select-fixer.js | 5 +++++ experimental/gppa-google-sheets-filter-by-date.php | 6 ++++++ experimental/gppa-gv-display-field-value.php | 6 ++++++ experimental/gppa-hydrate-choices-on-entry-list.php | 6 ++++++ experimental/gppa-lmt-numbers-only-modifier.php | 6 ++++++ experimental/gppa-multi-file-value-as-links.php | 6 ++++++ experimental/gppa-object-type-acf-options-page.php | 6 ++++++ .../gppa-object-type-json-api-with-query-params.php | 6 ++++++ experimental/gppa-object-type-json-api.php | 6 ++++++ experimental/gppa-page-modifier.php | 6 ++++++ experimental/gppa-populate-and-delete-coupons.php | 6 ++++++ experimental/gppa-populate-date-in-fields-format.php | 6 ++++++ .../gppa-remove-filter-groups-with-missing-values.php | 6 ++++++ experimental/gppa-select-all-checkboxes.js | 5 +++++ .../gppa-simply-schedule-appointments-refresh-lmts.js | 5 +++++ experimental/gppa-wc-country-to-gf-address-field.php | 6 ++++++ experimental/gppa-woo-commerce-lmt.php | 6 ++++++ experimental/gprf-reload-globally.js | 5 +++++ experimental/gpuid-belgium-cipher.php | 6 ++++++ experimental/gpuid-clear-index.php | 6 ++++++ experimental/gpuid-custom-format-ABC12345.php | 6 ++++++ experimental/gpwc-limit-line-breaks.js | 5 +++++ .../gspc-remove-wc-product-from-entry-order-summary.php | 6 ++++++ .../gspc-set-subscription-length-by-field-value.php | 6 ++++++ experimental/gw-add-attachments-by-field.php | 6 ++++++ experimental/gw-add-custom-footer-button.php | 6 ++++++ experimental/gw-auto-prepend-https.js | 5 +++++ experimental/gw-capture-file-extension.php | 6 ++++++ experimental/gw-capture-filename.js | 5 +++++ ...gw-capture-list-field-column-as-comma-delimited-list.php | 6 ++++++ experimental/gw-checkbox-to-list-field.js | 5 +++++ experimental/gw-count-sundays.js | 5 +++++ experimental/gw-crazy-snippet.php | 6 ++++++ experimental/gw-create-extra-entry.php | 6 ++++++ experimental/gw-delete-entries-when-user-deleted.php | 6 ++++++ experimental/gw-field-ids-in-editor-labels.php | 6 ++++++ experimental/gw-force-greater-end-time.js | 5 +++++ experimental/gw-force-numeric-keyboard-on-mobile.php | 6 ++++++ experimental/gw-gfapc-map-multiple-fields-to-taxonomy.php | 6 ++++++ experimental/gw-gravity-forms-to-wp-job-manager.php | 6 ++++++ experimental/gw-live-field-values-post-submission.php | 6 ++++++ experimental/gw-minimum-file-count.php | 6 ++++++ experimental/gw-prevent-duplicate-drop-down-selections.js | 5 +++++ experimental/gw-prevent-non-numeric-chars.js | 5 +++++ experimental/gw-preview-mode-tweaks.php | 6 ++++++ experimental/gw-require-house-number-in-address.php | 6 ++++++ experimental/gw-rich-text-html-fields.php | 6 ++++++ experimental/gw-round-total.js | 5 +++++ experimental/gw-use-html5-datepicker.js | 5 +++++ experimental/gw-validate-postcode.php | 6 ++++++ experimental/gw-value-counter.js | 5 +++++ 78 files changed, 449 insertions(+) create mode 100644 experimental/gfjs-early-init-scripts.php create mode 100644 experimental/gfsa-auto-allow-administrator-access.php create mode 100644 experimental/gpdec-delay-for-gravity-pdf-bg-processing.php create mode 100644 experimental/gpdtc-calculated-input-value.php create mode 100644 experimental/gpi-auto-selections.php create mode 100644 experimental/gpi-copy-exhausted-inventory-to-another-field.js create mode 100644 experimental/gpi-gpnf-exclude-child-entries-when-attached-to-a-partial-entry.php create mode 100644 experimental/gpi-packaged-products.php create mode 100644 experimental/gpnf-comma-delimited-email-list.php create mode 100644 experimental/gpnf-count-answered-child-fields.js create mode 100644 experimental/gpnf-delete-expired-orphans.php create mode 100644 experimental/gpnf-exclude-gf-inline-scripts-from-cloudflare-rocket-loader.php create mode 100644 experimental/gpnf-gravity-view-values.php create mode 100644 experimental/gpnf-gv-duplicate-child-entries.php create mode 100644 experimental/gpnf-lock-child-entries-by-date.php create mode 100644 experimental/gpnf-modify-display-value-by-date.php create mode 100644 experimental/gpnf-parent-form-field-values-in-child-form-filters.php create mode 100644 experimental/gpnf-preserve-child-entry-created-by.php create mode 100644 experimental/gpnf-restore-default-value-on-edit.php create mode 100644 experimental/gpnf-sortable-entries.php create mode 100644 experimental/gppa-acf-populate-multiple-items-from-repeater-row.php create mode 100644 experimental/gppa-click-image-choice-image-wrapper.js create mode 100644 experimental/gppa-conditional-logic-when-no-results.js create mode 100644 experimental/gppa-conditionally-exclude-filter-by-field-value.php create mode 100644 experimental/gppa-enable-choice-values-for-gravity-view.php create mode 100644 experimental/gppa-faceted-filters.php create mode 100644 experimental/gppa-filter-entries-by-time-field.php create mode 100644 experimental/gppa-firefox-select-fixer.js create mode 100644 experimental/gppa-google-sheets-filter-by-date.php create mode 100644 experimental/gppa-gv-display-field-value.php create mode 100644 experimental/gppa-hydrate-choices-on-entry-list.php create mode 100644 experimental/gppa-lmt-numbers-only-modifier.php create mode 100644 experimental/gppa-multi-file-value-as-links.php create mode 100644 experimental/gppa-object-type-acf-options-page.php create mode 100644 experimental/gppa-object-type-json-api-with-query-params.php create mode 100644 experimental/gppa-object-type-json-api.php create mode 100644 experimental/gppa-page-modifier.php create mode 100644 experimental/gppa-populate-and-delete-coupons.php create mode 100644 experimental/gppa-populate-date-in-fields-format.php create mode 100644 experimental/gppa-remove-filter-groups-with-missing-values.php create mode 100644 experimental/gppa-select-all-checkboxes.js create mode 100644 experimental/gppa-simply-schedule-appointments-refresh-lmts.js create mode 100644 experimental/gppa-wc-country-to-gf-address-field.php create mode 100644 experimental/gppa-woo-commerce-lmt.php create mode 100644 experimental/gprf-reload-globally.js create mode 100644 experimental/gpuid-belgium-cipher.php create mode 100644 experimental/gpuid-clear-index.php create mode 100644 experimental/gpuid-custom-format-ABC12345.php create mode 100644 experimental/gpwc-limit-line-breaks.js create mode 100644 experimental/gspc-remove-wc-product-from-entry-order-summary.php create mode 100644 experimental/gspc-set-subscription-length-by-field-value.php create mode 100644 experimental/gw-add-attachments-by-field.php create mode 100644 experimental/gw-add-custom-footer-button.php create mode 100644 experimental/gw-auto-prepend-https.js create mode 100644 experimental/gw-capture-file-extension.php create mode 100644 experimental/gw-capture-filename.js create mode 100644 experimental/gw-capture-list-field-column-as-comma-delimited-list.php create mode 100644 experimental/gw-checkbox-to-list-field.js create mode 100644 experimental/gw-count-sundays.js create mode 100644 experimental/gw-crazy-snippet.php create mode 100644 experimental/gw-create-extra-entry.php create mode 100644 experimental/gw-delete-entries-when-user-deleted.php create mode 100644 experimental/gw-field-ids-in-editor-labels.php create mode 100644 experimental/gw-force-greater-end-time.js create mode 100644 experimental/gw-force-numeric-keyboard-on-mobile.php create mode 100644 experimental/gw-gfapc-map-multiple-fields-to-taxonomy.php create mode 100644 experimental/gw-gravity-forms-to-wp-job-manager.php create mode 100644 experimental/gw-live-field-values-post-submission.php create mode 100644 experimental/gw-minimum-file-count.php create mode 100644 experimental/gw-prevent-duplicate-drop-down-selections.js create mode 100644 experimental/gw-prevent-non-numeric-chars.js create mode 100644 experimental/gw-preview-mode-tweaks.php create mode 100644 experimental/gw-require-house-number-in-address.php create mode 100644 experimental/gw-rich-text-html-fields.php create mode 100644 experimental/gw-round-total.js create mode 100644 experimental/gw-use-html5-datepicker.js create mode 100644 experimental/gw-validate-postcode.php create mode 100644 experimental/gw-value-counter.js diff --git a/experimental/gfjs-early-init-scripts.php b/experimental/gfjs-early-init-scripts.php new file mode 100644 index 000000000..6b80d51b4 --- /dev/null +++ b/experimental/gfjs-early-init-scripts.php @@ -0,0 +1,6 @@ + Date: Tue, 7 Jan 2025 10:40:16 -0600 Subject: [PATCH 81/82] Tooling: Removed experimental snippet migration script. --- migrate-experimental.mjs | 356 --------------------------------------- 1 file changed, 356 deletions(-) delete mode 100755 migrate-experimental.mjs diff --git a/migrate-experimental.mjs b/migrate-experimental.mjs deleted file mode 100755 index 408f37e99..000000000 --- a/migrate-experimental.mjs +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env node - -import fs from 'fs/promises'; -import path from 'path'; -import { execSync } from 'child_process'; - -const EXPERIMENTAL_DIR = 'experimental'; - -// Map prefixes to their target directories -const PREFIX_MAP = { - // Gravity Forms Core & Related - 'gf': 'gravity-forms', - 'gflow': 'gravity-flow', - 'gfoai': 'gravityforms-openai', - - // Gravity Connect - 'gca': 'gc-airtable', - 'gcgs': 'gc-google-sheets', - 'gcn': 'gc-notion', - 'gcoai': 'gc-openai', - - // Gravity Perks - 'gpaa': 'gp-address-autocomplete', - 'gpac': 'gp-advanced-calculations', - 'gpapf': 'gp-advanced-phone-field', - 'gpasc': 'gp-advanced-save-and-continue', - 'gpadvs': 'gp-advanced-select', - 'gpalf': 'gp-auto-list-field', - 'gpal': 'gp-auto-login', - 'gpbua': 'gp-better-user-activation', - 'gpb': 'gp-blocklist', - 'gpcld': 'gp-conditional-logic-dates', - 'gpcp': 'gp-conditional-pricing', - 'gpcc': 'gp-copy-cat', - 'gpdtc': 'gp-date-time-calculator', - 'gpdec': 'gp-easy-passthrough', - 'gpep': 'gp-easy-passthrough', - 'gpepee': 'gp-easy-passthrough', - 'gpecf': 'gp-ecommerce-fields', - 'gpeu': 'gp-email-users', - 'gpeb': 'gp-entry-blocks', - 'gpfr': 'gp-file-renamer', - 'gpfup': 'gp-file-upload-pro', - 'gpgs': 'gp-google-sheets', - 'gpi': 'gp-inventory', - 'gplcb': 'gp-limit-checkboxes', - 'gplc': 'gp-limit-choices', - 'gpld': 'gp-limit-dates', - 'gpls': 'gp-limit-submissions', - 'gplp': 'gp-live-preview', - 'gpml': 'gp-media-library', - 'gpmpn': 'gp-multi-page-navigation', - 'gpnf': 'gp-nested-forms', - 'gpns': 'gp-notification-scheduler', - 'gppt': 'gp-page-transitions', - 'gpppw': 'gp-pay-per-word', - 'gppa': 'gp-populate-anything', - 'gppcmt': 'gp-post-content-merge-tags', - 'gpps': 'gp-preview-submission', - 'gppr': 'gp-price-range', - 'gpqr': 'gp-qr-code', - 'gpro': 'gp-read-only', - 'gprf': 'gp-reload-form', - 'gpuid': 'gp-unique-id', - 'gpwc': 'gp-word-count', - - // Gravity Shop - 'gspc': 'gs-product-configurator', - 'wcgfpa': 'wc-gf-product-addons', - - // General Gravity Wiz - 'gw': 'gravity-forms' -}; - -// Special cases that don't follow prefix pattern -const SPECIAL_CASES = { - 'gp-hide-perks-from-plugins-page.php': 'gravity-forms', - 'gp-update-perks-tab-title.php': 'gravity-forms' -}; - -async function getTargetDir(filename) { - // Check special cases first - if (SPECIAL_CASES[filename]) { - return SPECIAL_CASES[filename]; - } - - // Get the prefix from the filename - const prefix = Object.keys(PREFIX_MAP) - .sort((a, b) => b.length - a.length) // Sort by length descending to match longest prefix first - .find(prefix => filename.startsWith(prefix)); - - if (!prefix) { - throw new Error(`No matching prefix found for ${filename}`); - } - return PREFIX_MAP[prefix]; -} - -async function readFileContent(filepath) { - const content = await fs.readFile(filepath, 'utf8'); - return content; -} - -async function updateHeaderWithExperimental(content, filename) { - const lines = content.split('\n'); - const isPHP = filename.endsWith('.php'); - let headerStart = -1; - let headerEnd = -1; - - // Find the header block - for (let i = 0; i < lines.length; i++) { - if (lines[i].includes('/**')) { - headerStart = i; - } else if (headerStart !== -1 && lines[i].includes('*/')) { - headerEnd = i; - break; - } - } - - // If no header found, create a new one - if (headerStart === -1) { - const prefix = isPHP ? ' !line.includes('Experimental Snippet')); - - // Find title and URL lines - const titleLineIndex = cleanedHeaderLines.findIndex(line => { - const trimmed = line.trim(); - return trimmed.startsWith('* Gravity Wiz //') || trimmed.startsWith('* Gravity Perks //'); - }); - - // Find URL line - const urlLineIndex = cleanedHeaderLines.findIndex(line => - line.includes('https://') || line.includes('http://') - ); - - // Determine where to insert the experimental flag - let insertIndex; - if (urlLineIndex !== -1) { - // Insert after URL - insertIndex = urlLineIndex; - } else if (titleLineIndex !== -1) { - // Insert after title - insertIndex = titleLineIndex; - } else { - // No title found, insert after comment start - insertIndex = 0; - } - - // Add experimental flag with appropriate blank lines - if (insertIndex === 0) { - cleanedHeaderLines.splice(1, 0, ' * Experimental Snippet πŸ§ͺ'); - } else { - // Always add blank line before experimental flag - cleanedHeaderLines.splice(insertIndex + 1, 0, ' *', ' * Experimental Snippet πŸ§ͺ'); - } - - // Remove any duplicate blank lines - for (let i = cleanedHeaderLines.length - 2; i >= 0; i--) { - if (cleanedHeaderLines[i].trim() === '*' && cleanedHeaderLines[i + 1].trim() === '*') { - cleanedHeaderLines.splice(i, 1); - } - } - - // Reconstruct the file - let newContent = ''; - - // Add PHP tag if needed - if (isPHP) { - newContent += ' !line.includes(' r.status === 'Migrated').length, - alreadyMigrated: results.filter(r => r.status === 'Already Migrated').length, - targetExists: results.filter(r => r.status === 'Target Exists').length, - errors: results.filter(r => r.status === 'Error').length, - skipped: results.filter(r => r.status === 'Skipped').length, - total: results.length - }; - - // Print summary - console.log('\nMigration Summary:'); - console.log('================='); - console.log(`Total files: ${stats.total}`); - console.log(`βœ… Migrated: ${stats.migrated}`); - console.log(`⏭️ Already migrated: ${stats.alreadyMigrated}`); - console.log(`⚠️ Target exists: ${stats.targetExists}`); - console.log(`❌ Errors: ${stats.errors}`); - console.log(`⏩ Skipped: ${stats.skipped}`); - - // Print table header - console.log('\nDetailed Results:'); - console.log('| File | Target Directory | Status | Error |'); - console.log('|------|-----------------|---------|--------|'); - - // Print each result - results.forEach(result => { - const status = { - 'Migrated': 'βœ… Migrated', - 'Already Migrated': '⏭️ Already Migrated', - 'Target Exists': '⚠️ Target Exists', - 'Error': '❌ Error', - 'Skipped': '⏩ Skipped' - }[result.status]; - - console.log(`| \`${result.filename}\` | ${result.targetDir || '-'} | ${status} | ${result.error || '-'} |`); - }); -} - -async function main() { - try { - const files = await fs.readdir(EXPERIMENTAL_DIR); - const results = []; - - for (const file of files) { - const result = await processFile(file); - results.push(result); - } - - printResults(results); - } catch (err) { - console.error('Error:', err); - process.exit(1); - } -} - -main(); From 440ecd51cfc8e5266d79b5364993b44d3767ec81 Mon Sep 17 00:00:00 2001 From: Clay Griffiths Date: Tue, 7 Jan 2025 10:47:32 -0600 Subject: [PATCH 82/82] Formatting: Fixed some experimental snippets after migration. --- experimental/gpdec-delay-for-gravity-pdf-bg-processing.php | 2 +- .../gpdec-delay-for-gravity-pdf-bg-processing.php | 0 .../gppa-simply-schedule-appointments-refresh-lmts.js | 1 - gp-unique-id/gpuid-custom-format-ABC12345.php | 2 +- gravity-forms/gw-use-html5-datepicker.js | 4 ++-- 5 files changed, 4 insertions(+), 5 deletions(-) rename {gp-easy-passthrough => gp-disable-entry-creation}/gpdec-delay-for-gravity-pdf-bg-processing.php (100%) diff --git a/experimental/gpdec-delay-for-gravity-pdf-bg-processing.php b/experimental/gpdec-delay-for-gravity-pdf-bg-processing.php index 1daf4cb55..90000165e 100644 --- a/experimental/gpdec-delay-for-gravity-pdf-bg-processing.php +++ b/experimental/gpdec-delay-for-gravity-pdf-bg-processing.php @@ -2,5 +2,5 @@ /** * We're no longer using the experimental folder for experimental snippets. 🚧 * You can now find the snippet here: - * https://github.com/gravitywiz/snippet-library/blob/master/gp-easy-passthrough/gpdec-delay-for-gravity-pdf-bg-processing.php + * https://github.com/gravitywiz/snippet-library/blob/master/gp-disable-entry-creation/gpdec-delay-for-gravity-pdf-bg-processing.php */ diff --git a/gp-easy-passthrough/gpdec-delay-for-gravity-pdf-bg-processing.php b/gp-disable-entry-creation/gpdec-delay-for-gravity-pdf-bg-processing.php similarity index 100% rename from gp-easy-passthrough/gpdec-delay-for-gravity-pdf-bg-processing.php rename to gp-disable-entry-creation/gpdec-delay-for-gravity-pdf-bg-processing.php diff --git a/gp-populate-anything/gppa-simply-schedule-appointments-refresh-lmts.js b/gp-populate-anything/gppa-simply-schedule-appointments-refresh-lmts.js index 91006b985..99adbd1ab 100644 --- a/gp-populate-anything/gppa-simply-schedule-appointments-refresh-lmts.js +++ b/gp-populate-anything/gppa-simply-schedule-appointments-refresh-lmts.js @@ -1,5 +1,4 @@ /** - * Experimental Snippet πŸ§ͺ * --- STOP! --- * * This snippet is deprecated and no longer required if you are using the latest version of Simply Schedule Appointments. diff --git a/gp-unique-id/gpuid-custom-format-ABC12345.php b/gp-unique-id/gpuid-custom-format-ABC12345.php index 8daea19db..3e92c3291 100644 --- a/gp-unique-id/gpuid-custom-format-ABC12345.php +++ b/gp-unique-id/gpuid-custom-format-ABC12345.php @@ -1,4 +1,4 @@ -