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,79 @@
<?php
/**
* A list of form revisions in the Form Builder Revisions panel.
*
* @since 1.7.3
*
* @var string $active_class Active item class.
* @var string $current_version_url The URL to load the current form version.
* @var string $author_id Current form author ID.
* @var array $revisions A list of all form revisions.
* @var string $show_avatars Whether the site settings for showing avatars is enabled.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div class='wpforms-revisions-content'>
<div class="wpforms-revision-current-version<?php echo esc_attr( $active_class ); ?>">
<a href="<?php echo esc_url( $current_version_url ); ?>">
<?php if ( $show_avatars ) : ?>
<div class="wpforms-revision-gravatar">
<?php echo get_avatar( $author_id, 40 ); ?>
</div>
<?php endif; ?>
<div class='wpforms-revision-details'>
<p class='wpforms-revision-created'>
<strong><?php esc_html_e( 'Current Version', 'wpforms-lite' ); ?></strong>
</p>
<p class='wpforms-revision-author'>
<?php
$display_name = get_the_author_meta( 'display_name', $author_id );
printf( /* translators: %s - form revision author name. */
esc_html__( 'by %s', 'wpforms-lite' ),
! empty( $display_name ) ? esc_html( $display_name ) : esc_html__( 'Unknown user', 'wpforms-lite' )
);
?>
</p>
</div>
</a>
</div>
<ul class="wpforms-revisions-list">
<?php foreach ( $revisions as $revision ) : ?>
<li class="wpforms-revision<?php echo esc_attr( $revision['active_class'] ); ?>">
<a href="<?php echo esc_url( $revision['url'] ); ?>">
<?php if ( $show_avatars ) : ?>
<div class="wpforms-revision-gravatar">
<?php echo get_avatar( $revision['author_id'], 40 ); ?>
</div>
<?php endif; ?>
<div class='wpforms-revision-details'>
<p class='wpforms-revision-created'>
<strong><?php echo esc_html( $revision['time_diff'] ); ?></strong> (<?php echo esc_html( $revision['date_time'] ); ?>)
</p>
<p class='wpforms-revision-author'>
<?php
$display_name = get_the_author_meta( 'display_name', $revision['author_id'] );
printf( /* translators: %s - form revision author name. */
esc_html__( 'by %s', 'wpforms-lite' ),
! empty( $display_name ) ? esc_html( $display_name ) : esc_html__( 'Unknown user', 'wpforms-lite' )
);
?>
</p>
</div>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
@@ -0,0 +1,26 @@
<?php
/**
* "Revisions are disabled" notice in the Form Builder Revisions panel.
*
* @since 1.7.3
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$url = wpforms_utm_link(
'https://wpforms.com/docs/how-to-use-form-revisions-in-wpforms/#enable-post-revisions',
'Builder Revisions',
'Revisions Disabled Notice'
);
?>
<div class='wpforms-revisions-notice wpforms-revisions-notice-error'>
<h2><?php esc_html_e( 'Form Revisions Are Disabled', 'wpforms-lite' ); ?></h2>
<p><?php esc_html_e( 'It appears that revisions are disabled on your WordPress installation. You can enable revisions for WPForms while leaving posts revisions disabled.', 'wpforms-lite' ); ?></p>
<a href="<?php echo esc_url( $url ); ?>" target='_blank' rel='noopener noreferrer' class='button button-primary button-large'>
<?php esc_html_e( 'Learn How', 'wpforms-lite' ); ?>
</a>
</div>
@@ -0,0 +1,35 @@
<?php
/**
* "Revisions are limited" notice in the Form Builder Revisions panel.
*
* @since 1.7.3
*
* @var int $revisions_to_keep How many revisions are kept.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$url = wpforms_utm_link(
'https://wpforms.com/docs/how-to-use-form-revisions-in-wpforms/#enable-post-revisions',
'Builder Revisions',
'Revisions Limited Notice'
);
?>
<div class='wpforms-revisions-notice wpforms-revisions-notice-warning'>
<h2><?php esc_html_e( 'Form Revisions Are Limited', 'wpforms-lite' ); ?></h2>
<p>
<?php
printf( /* translators: %d - maximum number of revisions to keep. */
esc_html__( 'Revisions are enabled, but theyre limited to %d. You can increase this by making a simple change to your WordPress configuration.', 'wpforms-lite' ),
absint( $revisions_to_keep )
);
?>
</p>
<a href="<?php echo esc_url( $url ); ?>" target="_blank" rel="noopener noreferrer" class='button button-primary button-large'>
<?php esc_html_e( 'Learn How', 'wpforms-lite' ); ?>
</a>
</div>