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>
This commit is contained in:
root
2026-04-29 15:32:23 +00:00
parent 57b752f54e
commit b6df4dbb92
5385 changed files with 838580 additions and 2416 deletions
@@ -0,0 +1,110 @@
/* global wpforms_builder_lite, wpforms_builder, Choices, wpf */
// noinspection ES6ConvertVarToLetConst
/**
* @param wpforms_builder_lite.disable_notifications
*/
var WPFormsBuilderLite = window.WPFormsBuilderLite || ( function( document, window, $ ) { // eslint-disable-line no-var
/**
* Public functions and properties.
*
* @since 1.0.0
*
* @type {Object}
*/
const app = {
/**
* Start the engine.
*
* @since 1.0.0
*/
init() {
// Document ready
$( app.ready );
},
/**
* Document ready.
*
* @since 1.0.0
*/
ready() {
app.bindUIActions();
},
/**
* Element bindings.
*
* @since 1.0.0
*/
bindUIActions() {
// Warn users if they disable email notifications.
$( document ).on( 'change', '#wpforms-panel-field-settings-notification_enable', function() {
app.formBuilderNotificationAlert( $( this ).is( ':checked' ) );
} );
},
/**
* Warn users if they disable email notifications.
*
* @since 1.5.0
*
* @param {boolean} value Whether notifications enabled or not. 0 is disabled, 1 is enabled.
*/
formBuilderNotificationAlert( value ) {
if ( value !== false ) {
return;
}
$.alert( {
title: wpforms_builder.heads_up,
content: wpforms_builder_lite.disable_notifications,
icon: 'fa fa-exclamation-circle',
type: 'orange',
buttons: {
confirm: {
text: wpforms_builder.ok,
btnClass: 'btn-confirm',
keys: [ 'enter' ],
},
},
} );
},
/**
* Initialize Choices.js for the Coupon field.
*
* @since 1.9.4
*/
initCouponsChoicesJS() {
if ( typeof window.Choices !== 'function' ) {
return;
}
$( '.wpforms-field-option-row-allowed_coupons select:not(.choices__input)' ).each( function() {
const $select = $( this );
const choicesInstance = new Choices(
$select.get( 0 ),
{
shouldSort: false,
removeItemButton: true,
renderChoicesLimit: 5,
callbackOnInit() {
wpf.showMoreButtonForChoices( this.containerOuter.element );
},
} );
// Save Choices.js instance for future access.
$select.data( 'choicesjs', choicesInstance );
} );
},
};
// Provide access to public functions/properties.
return app;
}( document, window, jQuery ) );
WPFormsBuilderLite.init();
@@ -0,0 +1 @@
var WPFormsBuilderLite=window.WPFormsBuilderLite||((e,i,t)=>{let o={init(){t(o.ready)},ready(){o.bindUIActions()},bindUIActions(){t(e).on("change","#wpforms-panel-field-settings-notification_enable",function(){o.formBuilderNotificationAlert(t(this).is(":checked"))})},formBuilderNotificationAlert(e){!1===e&&t.alert({title:wpforms_builder.heads_up,content:wpforms_builder_lite.disable_notifications,icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"]}}})},initCouponsChoicesJS(){"function"==typeof i.Choices&&t(".wpforms-field-option-row-allowed_coupons select:not(.choices__input)").each(function(){var e=t(this),i=new Choices(e.get(0),{shouldSort:!1,removeItemButton:!0,renderChoicesLimit:5,callbackOnInit(){wpf.showMoreButtonForChoices(this.containerOuter.element)}});e.data("choicesjs",i)})}};return o})(document,window,jQuery);WPFormsBuilderLite.init();