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,120 @@
/* global wpCookies */
/**
* Entries list page.
*/
const WPFormsEntryList = window.WPFormsEntryList || ( function( document, window, $ ) {
/**
* Public functions and properties.
*
* @since 1.8.9
*
* @type {Object}
*/
const app = {
/**
* Initialize the engine.
*
* @since 1.8.9
*/
init() {
$( app.ready );
},
/**
* Ready.
*
* @since 1.8.9
*/
ready() {
app.events();
},
/**
* Events.
*
* @since 1.8.9
*/
events() {
// Show sample data for entries when the Explore Entries is clicked.
$( '#wpforms-entries-explore' ).on( 'click', app.showEntries );
// Hide sample data for entries when the Hide Sample Data is clicked.
$( '#wpforms-hide-sample-data' ).on( 'click', app.hideEntries );
// Toggle the action dropdown.
$( '#wpforms-list-table-ext-edit-columns-cog' ).on( 'click', app.toggleActionDropdown );
$( '#wpcontent' ).on( 'click', app.hideActionDropdown );
},
/**
* Show entries.
*
* @since 1.8.9
*
* @param {Object} e Event object.
*/
showEntries( e ) {
e.preventDefault();
$( '.entries-modal' ).fadeOut( 500, function() {
$( '#wpforms-sample-entry-main-notice' ).slideDown( 250 );
$( '#wpforms-entries-list' ).addClass( 'wpforms-entires-sample-view' );
} );
wpCookies.set( 'wpforms_sample_entries', 'true', 2592000 ); // 1 month
},
/**
* Hide entries.
*
* @since 1.8.9
*
* @param {Object} e Event object.
*/
hideEntries( e ) {
e.preventDefault();
// Bypass animation as this is causing fade in/out issues.
$( '#wpforms-sample-entry-main-notice' ).fadeOut( 250, function() {
$( '#wpforms-entries-list' ).removeClass( 'wpforms-entires-sample-view' );
$( '.wpforms-sample-entry-notice' ).removeClass( 'wpf-no-animate' );
$( '.entries-modal' ).fadeIn( 500 );
} );
wpCookies.remove( 'wpforms_sample_entries' );
},
/**
* Toggle the action dropdown.
*
* @since 1.8.9
*
* @param {Object} e Event object.
*/
toggleActionDropdown( e ) {
e.preventDefault();
e.stopPropagation();
$( this ).parent().toggleClass( 'is_active' );
},
/**
* Hide the action dropdown.
*
* @since 1.8.9
*/
hideActionDropdown() {
const actionColumn = $( '#wpforms-list-table-ext-edit-columns-cog' ).parent();
if ( actionColumn.hasClass( 'is_active' ) ) {
actionColumn.removeClass( 'is_active' );
}
},
};
return app;
}( document, window, jQuery ) );
// Initialize the engine.
WPFormsEntryList.init();
@@ -0,0 +1 @@
let WPFormsEntryList=window.WPFormsEntryList||(t=>{let e={init(){t(e.ready)},ready(){e.events()},events(){t("#wpforms-entries-explore").on("click",e.showEntries),t("#wpforms-hide-sample-data").on("click",e.hideEntries),t("#wpforms-list-table-ext-edit-columns-cog").on("click",e.toggleActionDropdown),t("#wpcontent").on("click",e.hideActionDropdown)},showEntries(e){e.preventDefault(),t(".entries-modal").fadeOut(500,function(){t("#wpforms-sample-entry-main-notice").slideDown(250),t("#wpforms-entries-list").addClass("wpforms-entires-sample-view")}),wpCookies.set("wpforms_sample_entries","true",2592e3)},hideEntries(e){e.preventDefault(),t("#wpforms-sample-entry-main-notice").fadeOut(250,function(){t("#wpforms-entries-list").removeClass("wpforms-entires-sample-view"),t(".wpforms-sample-entry-notice").removeClass("wpf-no-animate"),t(".entries-modal").fadeIn(500)}),wpCookies.remove("wpforms_sample_entries")},toggleActionDropdown(e){e.preventDefault(),e.stopPropagation(),t(this).parent().toggleClass("is_active")},hideActionDropdown(){var e=t("#wpforms-list-table-ext-edit-columns-cog").parent();e.hasClass("is_active")&&e.removeClass("is_active")}};return e})((document,window,jQuery));WPFormsEntryList.init();
@@ -0,0 +1,105 @@
/**
* View single entry page.
*
* @since 1.8.9
*/
const WPFormsViewEntry = window.WPFormsViewEntry || ( function( document, window, $ ) {
/**
* Elements holder.
*
* @since 1.8.9
*
* @type {Object}
*/
let el = {};
/**
* Public functions and properties.
*
* @since 1.8.9
*
* @type {Object}
*/
const app = {
/**
* Initialize the engine.
*
* @since 1.8.9
*/
init() {
$( app.ready );
},
/**
* Document ready.
*
* @since 1.8.9
*/
ready() {
app.setup();
app.events();
},
/**
* Setup. Prepare some variables.
*
* @since 1.8.9
*/
setup() {
// Cache DOM elements.
el = {
menuClass: '.wpforms-entries-settings-menu',
};
},
/**
* Events.
*
* @since 1.8.9
*/
events() {
$( '#wpforms-entries-settings-button' ).on( 'click', app.menuToggle );
$( '#wpcontent' ).on( 'click', app.menuHide );
},
/**
* Handler for the menu toggle behavior.
*
* @since 1.8.9
*
* @param {Object} event Event object.
*/
menuToggle( event ) {
event.preventDefault();
event.stopPropagation();
// Toggle the visibility of the matched element.
$( el.menuClass ).toggle( 0, function() {
const $menu = $( this );
// When the menu is open, aria-expended="true".
$menu.attr( 'aria-expanded', $menu.is( ':visible' ) );
} );
},
/**
* Handler for hiding the menu when a click is outside of it.
*
* @since 1.8.9
*
* @param {Object} event Event object.
*/
menuHide( event ) {
// Check if the clicked element is not the menu container or a child of it.
if ( ! $( event.target ).closest( `${ el.menuClass }:visible` ).length ) {
$( el.menuClass ).attr( 'aria-expanded', 'false' ).hide();
}
},
};
return app;
}( document, window, jQuery ) );
// Initialize the engine.
WPFormsViewEntry.init();
@@ -0,0 +1 @@
let WPFormsViewEntry=window.WPFormsViewEntry||(t=>{let n={},e={init(){t(e.ready)},ready(){e.setup(),e.events()},setup(){n={menuClass:".wpforms-entries-settings-menu"}},events(){t("#wpforms-entries-settings-button").on("click",e.menuToggle),t("#wpcontent").on("click",e.menuHide)},menuToggle(e){e.preventDefault(),e.stopPropagation(),t(n.menuClass).toggle(0,function(){var e=t(this);e.attr("aria-expanded",e.is(":visible"))})},menuHide(e){t(e.target).closest(n.menuClass+":visible").length||t(n.menuClass).attr("aria-expanded","false").hide()}};return e})((document,window,jQuery));WPFormsViewEntry.init();