From 14f187dd805d5910651ed87b9ee37bf7158fbb00 Mon Sep 17 00:00:00 2001 From: Tony Volpe Date: Wed, 10 Jan 2024 21:13:38 +0000 Subject: [PATCH] Merged in feature/Plugin-updates (pull request #19) Updated plugins * Updated plugins --- .../assets/scripts/dtx.js | 450 +- .../assets/scripts/dtx.min.js | 2 +- .../assets/scripts/tag-generator.min.js | 2 +- .../changelog.txt | 429 +- .../contact-form-7-dynamic-text-extension.php | 10 +- .../includes/admin.php | 4 + .../includes/admin/settings.php | 770 ++ .../includes/admin/update-check.php | 97 + .../includes/shortcodes.php | 16 + .../includes/utilities.php | 213 + .../includes/validation.php | 602 +- .../readme.txt | 17 +- .../admin/class-expose-shortlinks.php | 3 + .../admin/class-gutenberg-compatibility.php | 4 +- .../class-premium-upsell-admin-block.php | 45 +- .../wordpress-seo/admin/views/licenses.php | 133 +- ...demy-2170-rtl.css => academy-2180-rtl.css} | 0 .../{academy-2170.css => academy-2180.css} | 0 ...2170-rtl.css => admin-global-2180-rtl.css} | 0 ...-global-2170.css => admin-global-2180.css} | 0 ...bar-2170-rtl.css => adminbar-2180-rtl.css} | 0 .../{adminbar-2170.css => adminbar-2180.css} | 0 ...2170-rtl.css => ai-generator-2180-rtl.css} | 0 ...nerator-2170.css => ai-generator-2180.css} | 0 ...lerts-2170-rtl.css => alerts-2180-rtl.css} | 0 .../dist/{alerts-2170.css => alerts-2180.css} | 0 ...l.css => black-friday-banner-2180-rtl.css} | 0 ...-2170.css => black-friday-banner-2180.css} | 0 ...rd-2170-rtl.css => dashboard-2180-rtl.css} | 0 ...{dashboard-2170.css => dashboard-2180.css} | 0 ...ge-2170-rtl.css => edit-page-2180-rtl.css} | 0 ...{edit-page-2170.css => edit-page-2180.css} | 0 ...or-2170-rtl.css => elementor-2180-rtl.css} | 0 ...{elementor-2170.css => elementor-2180.css} | 0 ...70-rtl.css => featured-image-2180-rtl.css} | 0 ...image-2170.css => featured-image-2180.css} | 0 ...tl.css => filter-explanation-2180-rtl.css} | 0 ...n-2170.css => filter-explanation-2180.css} | 0 ... => first-time-configuration-2180-rtl.css} | 0 ....css => first-time-configuration-2180.css} | 0 ...{icons-2170-rtl.css => icons-2180-rtl.css} | 0 .../dist/{icons-2170.css => icons-2180.css} | 0 ...170-rtl.css => inside-editor-2180-rtl.css} | 0 ...editor-2170.css => inside-editor-2180.css} | 0 ...170-rtl.css => introductions-2180-rtl.css} | 0 ...ctions-2170.css => introductions-2180.css} | 0 ...abox-2170-rtl.css => metabox-2180-rtl.css} | 0 .../{metabox-2170.css => metabox-2180.css} | 0 ... => metabox-primary-category-2180-rtl.css} | 0 ....css => metabox-primary-category-2180.css} | 0 ...{modal-2170-rtl.css => modal-2180-rtl.css} | 0 .../dist/{modal-2170.css => modal-2180.css} | 0 ...epo-2170-rtl.css => monorepo-2180-rtl.css} | 0 .../{monorepo-2170.css => monorepo-2180.css} | 0 ...2170-rtl.css => new-settings-2180-rtl.css} | 0 ...ettings-2170.css => new-settings-2180.css} | 0 ...170-rtl.css => notifications-2180-rtl.css} | 0 ...ations-2170.css => notifications-2180.css} | 0 ...n-2170-rtl.css => score_icon-2180-rtl.css} | 0 ...core_icon-2170.css => score_icon-2180.css} | 0 ...ss => structured-data-blocks-2180-rtl.css} | 0 ...70.css => structured-data-blocks-2180.css} | 0 ...port-2170-rtl.css => support-2180-rtl.css} | 0 .../{support-2170.css => support-2180.css} | 0 ...ind-2170-rtl.css => tailwind-2180-rtl.css} | 2 +- .../{tailwind-2170.css => tailwind-2180.css} | 2 +- ...170-rtl.css => toggle-switch-2180-rtl.css} | 0 ...switch-2170.css => toggle-switch-2180.css} | 0 ...ips-2170-rtl.css => tooltips-2180-rtl.css} | 0 .../{tooltips-2170.css => tooltips-2180.css} | 0 ...uts-2170-rtl.css => workouts-2180-rtl.css} | 0 .../{workouts-2170.css => workouts-2180.css} | 0 ...rtl.css => wpseo-dismissible-2180-rtl.css} | 0 ...le-2170.css => wpseo-dismissible-2180.css} | 0 .../css/dist/yoast-extensions-2170-rtl.css | 1 - .../css/dist/yoast-extensions-2170.css | 1 - .../css/dist/yoast-extensions-2180-rtl.css | 1 + .../css/dist/yoast-extensions-2180.css | 1 + ...-rtl.css => yst_plugin_tools-2180-rtl.css} | 0 ...ols-2170.css => yst_plugin_tools-2180.css} | 0 ...170-rtl.css => yst_seo_score-2180-rtl.css} | 0 ..._score-2170.css => yst_seo_score-2180.css} | 0 .../plugins/wordpress-seo/js/dist/42.js | 2 +- .../plugins/wordpress-seo/js/dist/academy.js | 4 +- .../js/dist/addon-installation.js | 4 +- .../wordpress-seo/js/dist/admin-global.js | 2 +- .../wordpress-seo/js/dist/admin-modules.js | 4 +- .../wordpress-seo/js/dist/analysis-worker.js | 2 +- .../wordpress-seo/js/dist/api-client.js | 2 +- .../wordpress-seo/js/dist/block-editor.js | 171 +- .../wordpress-seo/js/dist/bulk-editor.js | 2 +- .../wordpress-seo/js/dist/classic-editor.js | 235 +- .../wordpress-seo/js/dist/crawl-settings.js | 2 +- .../wordpress-seo/js/dist/dashboard-widget.js | 2 +- .../wordpress-seo/js/dist/dynamic-blocks.js | 2 +- .../wordpress-seo/js/dist/edit-page.js | 2 +- .../wordpress-seo/js/dist/editor-modules.js | 154 +- .../wordpress-seo/js/dist/elementor.js | 233 +- .../js/dist/externals-components.js | 152 +- .../js/dist/externals-contexts.js | 2 +- .../wordpress-seo/js/dist/externals-redux.js | 2 +- .../js/dist/externals/analysis.js | 20 +- .../js/dist/externals/analysisReport.js | 23 +- .../js/dist/externals/components.js | 4 +- .../js/dist/externals/componentsNew.js | 10 +- .../js/dist/externals/draftJs.js | 2 +- .../wordpress-seo/js/dist/externals/redux.js | 2 +- .../js/dist/externals/reduxJsToolkit.js | 2 +- .../externals/replacementVariableEditor.js | 32 +- .../dist/externals/searchMetadataPreviews.js | 4 +- .../js/dist/externals/styledComponents.js | 2 +- .../js/dist/filter-explanation.js | 2 +- .../js/dist/first-time-configuration.js | 16 +- .../js/dist/frontend-inspector-resources.js | 2 +- .../js/dist/help-scout-beacon.js | 2 +- .../plugins/wordpress-seo/js/dist/import.js | 2 +- .../wordpress-seo/js/dist/indexation.js | 4 +- .../js/dist/installation-success.js | 4 +- .../js/dist/integrations-page.js | 6 +- .../wordpress-seo/js/dist/introductions.js | 20 +- .../wordpress-seo/js/dist/languages/de.js | 2 +- .../wordpress-seo/js/dist/languages/ja.js | 2 +- .../wordpress-seo/js/dist/network-admin.js | 2 +- .../wordpress-seo/js/dist/new-settings.js | 206 +- .../wordpress-seo/js/dist/post-edit.js | 36 +- .../js/dist/quick-edit-handler.js | 2 +- .../wordpress-seo/js/dist/react-select.js | 2 +- .../js/dist/redirect-old-features-tab.js | 2 +- .../wordpress-seo/js/dist/reindex-links.js | 2 +- .../plugins/wordpress-seo/js/dist/settings.js | 6 +- .../js/dist/structured-data-blocks.js | 4 +- .../plugins/wordpress-seo/js/dist/support.js | 40 +- .../wordpress-seo/js/dist/term-edit.js | 2 +- .../js/dist/used-keywords-assessment.js | 2 +- .../js/dist/wincher-dashboard-widget.js | 12 +- .../wordpress-seo/js/dist/wordproof-uikit.js | 2 +- .../plugins/wordpress-seo/js/dist/workouts.js | 6 +- .../plugins/wordpress-seo/readme.txt | 44 +- .../src/generated/assets/externals.php | 2 +- .../src/generated/assets/languages.php | 2 +- .../src/generated/assets/plugin.php | 2 +- .../wordpress-seo/src/generated/container.php | 13 + .../alerts/trustpilot-review-notification.php | 16 + .../integrations/third-party/elementor.php | 16 + .../presenters/admin/sidebar-presenter.php | 2 +- .../plugins/wordpress-seo/vendor/autoload.php | 2 +- .../vendor/composer/autoload_classmap.php | 1 + .../vendor/composer/autoload_real.php | 8 +- .../vendor/composer/autoload_static.php | 9 +- .../vendor/composer/installed.php | 4 +- .../plugins/wordpress-seo/wp-seo-main.php | 2 +- .../plugins/wordpress-seo/wp-seo.php | 4 +- .../plugins/wp-native-php-sessions/LICENSE | 339 - .../assets/js/notices.js | 11 - .../inc/class-admin.php | 138 - .../inc/class-cli-command.php | 116 - .../inc/class-list-table.php | 87 - .../inc/class-session-handler.php | 126 - .../inc/class-session.php | 322 - .../pantheon-sessions.php | 747 -- .../plugins/wp-native-php-sessions/readme.txt | 229 - .../admin/assets/min-js/script.min.js | 2 +- .../class-bsf-analytics-loader.php | 236 +- .../plugins/wp-schema-pro/changelog.txt | 3 + .../wp-schema-pro/languages/wp-schema-pro.pot | 10842 ++++++++-------- .../plugins/wp-schema-pro/wp-schema-pro.php | 4 +- .../classes/class-bsf-sp-helper.php | 1462 +-- .../classes/class-bsf-sp-init-blocks.php | 16 +- 168 files changed, 9219 insertions(+), 9861 deletions(-) create mode 100644 wp/wp-content/plugins/contact-form-7-dynamic-text-extension/includes/admin/settings.php create mode 100644 wp/wp-content/plugins/contact-form-7-dynamic-text-extension/includes/admin/update-check.php rename wp/wp-content/plugins/wordpress-seo/css/dist/{academy-2170-rtl.css => academy-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{academy-2170.css => academy-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{admin-global-2170-rtl.css => admin-global-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{admin-global-2170.css => admin-global-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{adminbar-2170-rtl.css => adminbar-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{adminbar-2170.css => adminbar-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{ai-generator-2170-rtl.css => ai-generator-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{ai-generator-2170.css => ai-generator-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{alerts-2170-rtl.css => alerts-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{alerts-2170.css => alerts-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{black-friday-banner-2170-rtl.css => black-friday-banner-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{black-friday-banner-2170.css => black-friday-banner-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{dashboard-2170-rtl.css => dashboard-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{dashboard-2170.css => dashboard-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{edit-page-2170-rtl.css => edit-page-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{edit-page-2170.css => edit-page-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{elementor-2170-rtl.css => elementor-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{elementor-2170.css => elementor-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{featured-image-2170-rtl.css => featured-image-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{featured-image-2170.css => featured-image-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{filter-explanation-2170-rtl.css => filter-explanation-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{filter-explanation-2170.css => filter-explanation-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{first-time-configuration-2170-rtl.css => first-time-configuration-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{first-time-configuration-2170.css => first-time-configuration-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{icons-2170-rtl.css => icons-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{icons-2170.css => icons-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{inside-editor-2170-rtl.css => inside-editor-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{inside-editor-2170.css => inside-editor-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{introductions-2170-rtl.css => introductions-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{introductions-2170.css => introductions-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{metabox-2170-rtl.css => metabox-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{metabox-2170.css => metabox-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{metabox-primary-category-2170-rtl.css => metabox-primary-category-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{metabox-primary-category-2170.css => metabox-primary-category-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{modal-2170-rtl.css => modal-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{modal-2170.css => modal-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{monorepo-2170-rtl.css => monorepo-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{monorepo-2170.css => monorepo-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{new-settings-2170-rtl.css => new-settings-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{new-settings-2170.css => new-settings-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{notifications-2170-rtl.css => notifications-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{notifications-2170.css => notifications-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{score_icon-2170-rtl.css => score_icon-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{score_icon-2170.css => score_icon-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{structured-data-blocks-2170-rtl.css => structured-data-blocks-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{structured-data-blocks-2170.css => structured-data-blocks-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{support-2170-rtl.css => support-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{support-2170.css => support-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{tailwind-2170-rtl.css => tailwind-2180-rtl.css} (67%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{tailwind-2170.css => tailwind-2180.css} (67%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{toggle-switch-2170-rtl.css => toggle-switch-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{toggle-switch-2170.css => toggle-switch-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{tooltips-2170-rtl.css => tooltips-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{tooltips-2170.css => tooltips-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{workouts-2170-rtl.css => workouts-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{workouts-2170.css => workouts-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{wpseo-dismissible-2170-rtl.css => wpseo-dismissible-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{wpseo-dismissible-2170.css => wpseo-dismissible-2180.css} (100%) delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-2170.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-2180-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-2180.css rename wp/wp-content/plugins/wordpress-seo/css/dist/{yst_plugin_tools-2170-rtl.css => yst_plugin_tools-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{yst_plugin_tools-2170.css => yst_plugin_tools-2180.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{yst_seo_score-2170-rtl.css => yst_seo_score-2180-rtl.css} (100%) rename wp/wp-content/plugins/wordpress-seo/css/dist/{yst_seo_score-2170.css => yst_seo_score-2180.css} (100%) create mode 100644 wp/wp-content/plugins/wordpress-seo/src/integrations/alerts/trustpilot-review-notification.php delete mode 100644 wp/wp-content/plugins/wp-native-php-sessions/LICENSE delete mode 100644 wp/wp-content/plugins/wp-native-php-sessions/assets/js/notices.js delete mode 100644 wp/wp-content/plugins/wp-native-php-sessions/inc/class-admin.php delete mode 100644 wp/wp-content/plugins/wp-native-php-sessions/inc/class-cli-command.php delete mode 100644 wp/wp-content/plugins/wp-native-php-sessions/inc/class-list-table.php delete mode 100644 wp/wp-content/plugins/wp-native-php-sessions/inc/class-session-handler.php delete mode 100644 wp/wp-content/plugins/wp-native-php-sessions/inc/class-session.php delete mode 100644 wp/wp-content/plugins/wp-native-php-sessions/pantheon-sessions.php delete mode 100644 wp/wp-content/plugins/wp-native-php-sessions/readme.txt diff --git a/wp/wp-content/plugins/contact-form-7-dynamic-text-extension/assets/scripts/dtx.js b/wp/wp-content/plugins/contact-form-7-dynamic-text-extension/assets/scripts/dtx.js index f2323d38..87592955 100644 --- a/wp/wp-content/plugins/contact-form-7-dynamic-text-extension/assets/scripts/dtx.js +++ b/wp/wp-content/plugins/contact-form-7-dynamic-text-extension/assets/scripts/dtx.js @@ -1,226 +1,226 @@ -var $ = jQuery.noConflict(), - dtx = { - queue: [], - init: function() { - var $inputs = $('input.dtx-pageload[data-dtx-value]'); - if ($inputs.length) { - // If this is any of our built-in shortcodes, see if there's any that can be duplicated via client side - $inputs.each(function(i, el) { - var $input = $(el), - raw_value = $input.attr('data-dtx-value'), - v = decodeURIComponent(raw_value).split(' '); - if (v.length) { - var tag = v[0], - atts = {}; - if (v.length > 1) { - for (var x = 1; x < v.length; x++) { - var att = v[x].split('='); - if (att.length === 2) { - var key = att[0]; - atts[key] = att[1].split("'").join(''); - } - } - } - var value = ''; - switch (tag) { - case 'CF7_GET': - value = dtx.get(atts); - break; - case 'CF7_referrer': - value = dtx.referrer(atts); - break; - case 'CF7_URL': - value = dtx.current_url(atts); - break; - case 'CF7_get_cookie': - value = dtx.get_cookie(atts); - break; - case 'CF7_guid': - value = dtx.guid(); - break; - case 'CF7_get_current_var': - if (dtx.validKey(atts, 'key') && atts.key == 'url') { - value = dtx.current_url(atts); - } else { - return; // Do nothing, current page variables are safe to cache, just use the value that was calculated by server - } - break; - case 'CF7_get_post_var': // Current post variables are safe to cache - case 'CF7_get_custom_field': // Meta data is safe to cache - case 'CF7_get_taxonomy': // Terms are safe to cache - case 'CF7_get_attachment': // Media attachment info is safe to cache - case 'CF7_bloginfo': // Site info is safe to cache - case 'CF7_get_theme_option': // Theme options are safe to cache - return; // Do nothing, just use the value that was calculated by server - default: - if (tag) { - // Queue the requests for an AJAX call at the end of init - dtx.queue.push({ 'value': raw_value, 'multiline': $input.is('textarea') }); - } - return; // Don't continue after queuing it for AJAX - } - dtx.set($input, value); - } - }); - if (dtx.queue.length) { - setTimeout(function() { // Set timeout to force it async - $.ajax({ - type: 'POST', - url: dtx_obj.ajax_url, - dataType: 'json', // only accept strict JSON objects - data: { - 'action': 'wpcf7dtx', - 'shortcodes': dtx.queue - }, - cache: false, - error: function(xhr, status, error) { - console.error('[CF7 DTX AJAX ERROR]', error, status, xhr); - }, - success: function(data, status, xhr) { - if (typeof(data) == 'object' && data.length) { - $.each(data, function(i, obj) { - var $inputs = $('.wpcf7 form input.dtx-pageload[data-dtx-value="' + obj.raw_value + '"]'); - if ($inputs.length) { - dtx.set($inputs, obj.value); - $inputs.addClass('dtx-ajax-loaded'); - } - }); - } - } - }); - }, 10); - } - } - }, - /** - * Check if Key Exists in Object - */ - validKey: function(obj, key) { - return obj.hasOwnProperty(key) && typeof(obj[key]) == 'string' && obj[key].trim(); - }, - /** - * Maybe Obfuscate Value - * - * @see https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/dtx-attribute-obfuscate/ - */ - obfuscate: function(value, atts) { - value = value.trim(); - if (dtx.validKey(atts, 'obfuscate') && atts.obfuscate) { - var o = ''; - for (var i = 0; i < value.length; i++) { - o += '&#' + value.codePointAt(i) + ';'; - } - return o; - } - return value; - }, - /** - * Set Value for Form Field - */ - set: function($input, value) { - $input.attr('value', value).addClass('dtx-loaded'); - }, - /** - * Get Value form URL Query by Key - * - * @see @see https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/dtx-shortcode-php-get-variables/ - */ - get: function(atts) { - if (dtx.validKey(atts, 'key')) { - var query = window.location.search; - if (query) { - query = new URLSearchParams(query); - return dtx.obfuscate(query.get(atts.key).trim(), atts); - } - } - return ''; - }, - /** - * Get Referrering URL - * - * @see https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/dtx-shortcode-referrer-url/ - */ - referrer: function(atts) { - return dtx.obfuscate(document.referrer, atts); - }, - /** - * Get Current URL or Part - * - * @see https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/dtx-shortcode-current-url/ - */ - current_url: function(atts) { - if (atts.hasOwnProperty('part')) { - var parts = [ - 'scheme', // e.g. `http` - 'host', - 'port', - 'path', - 'query', // after the question mark ? - 'fragment' // after the pound sign # - ]; - if (parts.includes(atts.part)) { - // return part of the url - switch (atts.part) { - case 'scheme': - return dtx.obfuscate(window.location.protocol.replace(':', ''), atts); - case 'host': - return dtx.obfuscate(window.location.host, atts); - case 'port': - return dtx.obfuscate(window.location.port, atts); - case 'path': - return dtx.obfuscate(window.location.pathname, atts); - case 'query': - return dtx.obfuscate(window.location.search.replace('?', ''), atts); - case 'fragment': - return dtx.obfuscate(window.location.hash.replace('#', ''), atts); - default: - break; - } - } - } else { - return dtx.obfuscate(window.location.href, atts); // Return the full url - } - return ''; - }, - /** - * Get Cookie Value - * - * @since 3.3.0 - * - * @see https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/dtx-shortcode-cookie/ - */ - get_cookie: function(atts) { - if (atts.hasOwnProperty('key') && typeof(atts.key) == 'string' && atts.key.trim() != '') { - var keyValue = document.cookie.match('(^|;) ?' + atts.key.trim() + '=([^;]*)(;|$)'); - return keyValue ? dtx.obfuscate(keyValue[2], atts) : ''; - } - return ''; - }, - /** - * Generate a random GUID (globally unique identifier) - * - * @see https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/dtx-shortcode-guid/ - */ - guid: function() { - if (typeof(window.crypto) != 'undefined' && typeof(window.crypto.getRandomValues) != 'undefined') { - return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => - (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) - ).toUpperCase(); - } - console.warn('[CF7 DTX] Cryptographically secure PRNG is not available for generating GUID value'); - var d = new Date().getTime(), //Timestamp - d2 = ((typeof performance !== 'undefined') && performance.now && (performance.now() * 1000)) || 0; //Time in microseconds since page-load or 0 if unsupported - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - var r = Math.random() * 16; //random number between 0 and 16 - if (d > 0) { //Use timestamp until depleted - r = (d + r) % 16 | 0; - d = Math.floor(d / 16); - } else { //Use microseconds since page-load if supported - r = (d2 + r) % 16 | 0; - d2 = Math.floor(d2 / 16); - } - return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16).toUpperCase(); - }).toUpperCase();; - } - }; +var $ = jQuery.noConflict(), + dtx = { + queue: [], + init: function() { + var $inputs = $('input.dtx-pageload[data-dtx-value]'); + if ($inputs.length) { + // If this is any of our built-in shortcodes, see if there's any that can be duplicated via client side + $inputs.each(function(i, el) { + var $input = $(el), + raw_value = $input.attr('data-dtx-value'), + v = decodeURIComponent(raw_value).split(' '); + if (v.length) { + var tag = v[0], + atts = {}; + if (v.length > 1) { + for (var x = 1; x < v.length; x++) { + var att = v[x].split('='); + if (att.length === 2) { + var key = att[0]; + atts[key] = att[1].split("'").join(''); + } + } + } + var value = ''; + switch (tag) { + case 'CF7_GET': + value = dtx.get(atts); + break; + case 'CF7_referrer': + value = dtx.referrer(atts); + break; + case 'CF7_URL': + value = dtx.current_url(atts); + break; + case 'CF7_get_cookie': + value = dtx.get_cookie(atts); + break; + case 'CF7_guid': + value = dtx.guid(); + break; + case 'CF7_get_current_var': + if (dtx.validKey(atts, 'key') && atts.key == 'url') { + value = dtx.current_url(atts); + } else { + return; // Do nothing, current page variables are safe to cache, just use the value that was calculated by server + } + break; + case 'CF7_get_post_var': // Current post variables are safe to cache + case 'CF7_get_custom_field': // Meta data is safe to cache + case 'CF7_get_taxonomy': // Terms are safe to cache + case 'CF7_get_attachment': // Media attachment info is safe to cache + case 'CF7_bloginfo': // Site info is safe to cache + case 'CF7_get_theme_option': // Theme options are safe to cache + return; // Do nothing, just use the value that was calculated by server + default: + if (tag) { + // Queue the requests for an AJAX call at the end of init + dtx.queue.push({ 'value': raw_value, 'multiline': $input.is('textarea') }); + } + return; // Don't continue after queuing it for AJAX + } + dtx.set($input, value); + } + }); + if (dtx.queue.length) { + setTimeout(function() { // Set timeout to force it async + $.ajax({ + type: 'POST', + url: dtx_obj.ajax_url, + dataType: 'json', // only accept strict JSON objects + data: { + 'action': 'wpcf7dtx', + 'shortcodes': dtx.queue + }, + cache: false, + error: function(xhr, status, error) { + console.error('[CF7 DTX AJAX ERROR]', error, status, xhr); + }, + success: function(data, status, xhr) { + if (typeof(data) == 'object' && data.length) { + $.each(data, function(i, obj) { + var $inputs = $('.wpcf7 form input.dtx-pageload[data-dtx-value="' + obj.raw_value + '"]'); + if ($inputs.length) { + dtx.set($inputs, obj.value); + $inputs.addClass('dtx-ajax-loaded'); + } + }); + } + } + }); + }, 10); + } + } + }, + /** + * Check if Key Exists in Object + */ + validKey: function(obj, key) { + return obj.hasOwnProperty(key) && typeof(obj[key]) == 'string' && obj[key].trim(); + }, + /** + * Maybe Obfuscate Value + * + * @see https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/dtx-attribute-obfuscate/ + */ + obfuscate: function(value, atts) { + value = value.trim(); + if (dtx.validKey(atts, 'obfuscate') && atts.obfuscate) { + var o = ''; + for (var i = 0; i < value.length; i++) { + o += '&#' + value.codePointAt(i) + ';'; + } + return o; + } + return value; + }, + /** + * Set Value for Form Field + */ + set: function($input, value) { + $input.attr('value', value).addClass('dtx-loaded'); + }, + /** + * Get Value form URL Query by Key + * + * @see @see https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/dtx-shortcode-php-get-variables/ + */ + get: function(atts) { + if (dtx.validKey(atts, 'key')) { + var query = window.location.search; + if (query) { + query = new URLSearchParams(query); + return dtx.obfuscate(query.get(atts.key).trim(), atts); + } + } + return ''; + }, + /** + * Get Referrering URL + * + * @see https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/dtx-shortcode-referrer-url/ + */ + referrer: function(atts) { + return dtx.obfuscate(document.referrer, atts); + }, + /** + * Get Current URL or Part + * + * @see https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/dtx-shortcode-current-url/ + */ + current_url: function(atts) { + if (atts.hasOwnProperty('part')) { + var parts = [ + 'scheme', // e.g. `http` + 'host', + 'port', + 'path', + 'query', // after the question mark ? + 'fragment' // after the pound sign # + ]; + if (parts.includes(atts.part)) { + // return part of the url + switch (atts.part) { + case 'scheme': + return dtx.obfuscate(window.location.protocol.replace(':', ''), atts); + case 'host': + return dtx.obfuscate(window.location.host, atts); + case 'port': + return dtx.obfuscate(window.location.port, atts); + case 'path': + return dtx.obfuscate(window.location.pathname, atts); + case 'query': + return dtx.obfuscate(window.location.search.replace('?', ''), atts); + case 'fragment': + return dtx.obfuscate(window.location.hash.replace('#', ''), atts); + default: + break; + } + } + } else { + return dtx.obfuscate(window.location.href, atts); // Return the full url + } + return ''; + }, + /** + * Get Cookie Value + * + * @since 3.3.0 + * + * @see https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/dtx-shortcode-cookie/ + */ + get_cookie: function(atts) { + if (atts.hasOwnProperty('key') && typeof(atts.key) == 'string' && atts.key.trim() != '') { + var keyValue = document.cookie.match('(^|;) ?' + atts.key.trim() + '=([^;]*)(;|$)'); + return keyValue ? dtx.obfuscate(keyValue[2], atts) : ''; + } + return ''; + }, + /** + * Generate a random GUID (globally unique identifier) + * + * @see https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/dtx-shortcode-guid/ + */ + guid: function() { + if (typeof(window.crypto) != 'undefined' && typeof(window.crypto.getRandomValues) != 'undefined') { + return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => + (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) + ).toUpperCase(); + } + console.warn('[CF7 DTX] Cryptographically secure PRNG is not available for generating GUID value'); + var d = new Date().getTime(), //Timestamp + d2 = ((typeof performance !== 'undefined') && performance.now && (performance.now() * 1000)) || 0; //Time in microseconds since page-load or 0 if unsupported + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = Math.random() * 16; //random number between 0 and 16 + if (d > 0) { //Use timestamp until depleted + r = (d + r) % 16 | 0; + d = Math.floor(d / 16); + } else { //Use microseconds since page-load if supported + r = (d2 + r) % 16 | 0; + d2 = Math.floor(d2 / 16); + } + return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16).toUpperCase(); + }).toUpperCase();; + } + }; $(document).ready(dtx.init); \ No newline at end of file diff --git a/wp/wp-content/plugins/contact-form-7-dynamic-text-extension/assets/scripts/dtx.min.js b/wp/wp-content/plugins/contact-form-7-dynamic-text-extension/assets/scripts/dtx.min.js index 175a7328..a361301f 100644 --- a/wp/wp-content/plugins/contact-form-7-dynamic-text-extension/assets/scripts/dtx.min.js +++ b/wp/wp-content/plugins/contact-form-7-dynamic-text-extension/assets/scripts/dtx.min.js @@ -1,2 +1,2 @@ -/*! Do not edit, this file is generated automatically - 2023-09-18 14:09:50 EDT */ +/*! Do not edit, this file is generated automatically - 2024-01-09 15:01:30 MST */ var $=jQuery.noConflict(),dtx={queue:[],init:function(){var e=$("input.dtx-pageload[data-dtx-value]");e.length&&(e.each(function(e,t){var r=$(t),a=r.attr("data-dtx-value"),o=decodeURIComponent(a).split(" ");if(o.length){var n=o[0],c={};if(1(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)):(r=(new Date).getTime(),a="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0,"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random();return 0