Files
homeproz/wp-content/plugins/wpforms-lite/assets/js/admin/pages/privacy-compliance.min.js
T
root b6df4dbb92 Snapshot: MLS sync fixes, image refresh, plugin/theme updates
MLS plugin fixes from this session:
- Fix silent insert failures: location column NOT NULL was rejecting wpdb->insert calls,
  causing ~18k new properties since Dec 2025 to be lost. Inserts now build raw SQL
  with ST_PointFromText so the spatial column is populated atomically.
- Auto-refresh expired media URLs in MLS_Media_Handler::fetch_and_cache(), guarded by
  a property-level GET_LOCK so concurrent fetches share one API refresh.
- Normalize WP_Error to null in mls_get_property_image() so callers can rely on the
  documented string|null contract.
- Support comma-separated property_type filters in MLS_Query and MLS_Cluster so the
  homepage "View All Commercial" link (?property_type=Commercial+Sale,Land,Farm)
  actually filters correctly.
- Incremental sync now looks back 10 minutes past the latest modification timestamp
  as a safety margin against missed records.
- Smart sync exits silently (info-level, not warning) when a full sync is in progress.

Operational:
- New cron: weekly full sync Sundays at 3 AM (/usr/local/bin/mls-full-sync).
- New cron: hourly 2GB cap on mls-thumbnails/ and cache/transformed-images/
  (/usr/local/bin/mls-image-cache-cap).
- Logrotate config for wp-content/debug.log (2-day retention, daily rotation,
  delaycompress).

Repo policy:
- CLAUDE.md updated with explicit "commit everything except build artifacts" policy.
- .gitignore: untrack runtime image caches and debug.log rotations.

Other modifications in this snapshot are pre-existing in-flight theme/plugin/db_content_updates work.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 15:32:23 +00:00

1 line
5.0 KiB
JavaScript
Executable File

let WPFormsPagesPrivacyCompliance=window.WPFormsPagesPrivacyCompliance||((a,o)=>{let i={},l={init:()=>{console.warn('WARNING! Function "WPFormsPagesPrivacyCompliance.init()" has been deprecated, please use the new "WPFormsPagesCommon.init()" function instead!'),o(l.ready)},ready:()=>{console.warn('WARNING! Function "WPFormsPagesPrivacyCompliance.ready()" has been deprecated, please use the new "WPFormsPagesCommon.ready()" function instead!'),l.initVars(),l.events()},initVars:()=>{console.warn('WARNING! Function "WPFormsPagesPrivacyCompliance.initVars()" has been deprecated, please use the new "WPFormsPagesCommon.initVars()" function instead!'),i={$stepInstall:o("section.step-install"),$stepInstallNum:o("section.step-install .num img"),$stepSetup:o("section.step-setup"),$stepSetupNum:o("section.step-setup .num img"),$stepAddon:o("section.step-addon"),$stepAddonNum:o("section.step-addon .num img")}},events:()=>{console.warn('WARNING! Function "WPFormsPagesPrivacyCompliance.events()" has been deprecated, please use the new "WPFormsPagesCommon.events()" function instead!'),i.$stepInstall.on("click","button",l.stepInstallClick),i.$stepSetup.on("click","button",l.gotoURL),i.$stepAddon.on("click","button",l.gotoURL)},stepInstallClick:t=>{console.warn('WARNING! Function "WPFormsPagesPrivacyCompliance.stepInstallClick()" has been deprecated, please use the new "WPFormsPagesCommon.stepInstallClick()" function instead!');let s=o(t.currentTarget);if(!s.hasClass("disabled")){let n=s.attr("data-action"),e="";switch(n){case"activate":e="wpforms_activate_addon",s.text(wpforms_pluginlanding.activating);break;case"install":e="wpforms_install_addon",s.text(wpforms_pluginlanding.installing);break;case"goto-url":return void(a.location.href=s.attr("data-url"));default:return}s.addClass("disabled"),l.showSpinner(i.$stepInstallNum);t=s.attr("data-plugin"),t={action:e,nonce:wpforms_admin.nonce,plugin:t,type:"plugin"};o.post(wpforms_admin.ajax_url,t).done(function(e){l.stepInstallDone(e,s,n)}).always(function(){l.hideSpinner(i.$stepInstallNum)})}},stepInstallDone:(e,n,t)=>{var s;console.warn('WARNING! Function "WPFormsPagesPrivacyCompliance.stepInstallDone()" has been deprecated, please use the new "WPFormsPagesCommon.stepInstallDone()" function instead!'),("install"===t?e.success&&e.data.is_activated:e.success)?(i.$stepInstallNum.attr("src",i.$stepInstallNum.attr("src").replace("step-1.","step-complete.")),n.addClass("grey").removeClass("button-primary").text(wpforms_pluginlanding.activated),l.stepInstallPluginStatus()):(t=(e="install"===t&&e.success&&!e.data.is_activated||"activate"===t)?wpforms_pluginlanding.wpconsent_manual_activate_url:wpforms_pluginlanding.wpconsent_manual_install_url,s=e?wpforms_pluginlanding.error_could_not_activate:wpforms_pluginlanding.error_could_not_install,e=e?wpforms_pluginlanding.plugins_page:wpforms_pluginlanding.download_now,n.removeClass("grey disabled").text(e).attr("data-action","goto-url").attr("data-url",t),n.after('<p class="error">'+s+"</p>"))},stepInstallPluginStatus:()=>{console.warn('WARNING! Function "WPFormsPagesPrivacyCompliance.stepInstallPluginStatus()" has been deprecated, please use the new "WPFormsPagesCommon.stepInstallPluginStatus()" function instead!');var e={action:"wpforms_privacy_compliance_page_check_plugin_status",nonce:wpforms_admin.nonce};o.post(wpforms_admin.ajax_url,e).done(l.stepInstallPluginStatusDone)},stepInstallPluginStatusDone:e=>{console.warn('WARNING! Function "WPFormsPagesPrivacyCompliance.stepInstallPluginStatusDone()" has been deprecated, please use the new "WPFormsPagesCommon.stepInstallPluginStatusDone()" function instead!'),e.success&&(i.$stepSetup.removeClass("grey"),i.$stepSetupBtn=i.$stepSetup.find("button"),0<e.data.setup_status?(i.$stepSetupNum.attr("src",i.$stepSetupNum.attr("src").replace("step-2.svg","step-complete.svg")),i.$stepAddon.removeClass("grey"),i.$stepAddonBtn=i.$stepAddon.find("button"),"pro"===e.data.license_level?(i.$stepAddonBtn.text(wpforms_pluginlanding.activated_pro),i.$stepAddonNum.attr("src",i.$stepAddonNum.attr("src").replace("step-3.svg","step-complete.svg"))):(i.$stepAddonBtn.attr("data-url",e.data.step3_button_url),i.$stepAddonBtn.removeClass("grey disabled").addClass("button-primary"))):i.$stepSetupBtn.removeClass("grey disabled").addClass("button-primary"))},gotoURL:e=>{console.warn('WARNING! Function "WPFormsPagesPrivacyCompliance.gotoURL()" has been deprecated, please use the new "WPFormsPagesCommon.gotoURL()" function instead!');var e=o(e.currentTarget),n=e.attr("data-url");!e.hasClass("disabled")&&n&&(a.location.href=n)},showSpinner:e=>{console.warn('WARNING! Function "WPFormsPagesPrivacyCompliance.showSpinner()" has been deprecated, please use the new "WPFormsPagesCommon.showSpinner()" function instead!'),e.siblings("i.loader").removeClass("hidden")},hideSpinner:e=>{console.warn('WARNING! Function "WPFormsPagesPrivacyCompliance.hideSpinner()" has been deprecated, please use the new "WPFormsPagesCommon.hideSpinner()" function instead!'),e.show(),e.siblings("i.loader").addClass("hidden")}};return l})((document,window),jQuery);WPFormsPagesPrivacyCompliance.init();