Files
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

79 lines
3.4 KiB
PHP
Executable File

<?php
/**
* Challenge main modal window template.
*
* @since 1.6.2
*
* @var string $state
* @var integer $step
* @var integer $minutes
*/
if ( ! \defined( 'ABSPATH' ) ) {
exit;
}
?>
<div class="wpforms-challenge <?php echo 'start' === $state ? 'wpforms-challenge-start' : ''; ?>"
data-wpforms-challenge-saved-step="<?php echo absint( $step ); ?>">
<div class="wpforms-challenge-list-block">
<i class="list-block-button toggle-list" title="<?php esc_attr_e( 'Toggle list', 'wpforms-lite' ); ?>"></i>
<i class="list-block-button challenge-skip" title="<?php esc_attr_e( 'Skip challenge', 'wpforms-lite' ); ?>"
data-cancel-title="<?php esc_attr_e( 'Cancel challenge', 'wpforms-lite' ); ?>"></i>
<p>
<?php
echo wp_kses(
sprintf(
/* translators: %1$d - number of minutes, %2$s - singular or plural form of 'minute'. */
__( 'Complete the <b>WPForms Challenge</b> and get up and running within %1$d&nbsp;%2$s.', 'wpforms-lite' ),
absint( $minutes ),
_n( 'minute', 'minutes', absint( $minutes ), 'wpforms-lite' )
),
[ 'b' => [] ]
);
?>
</p>
<ul class="wpforms-challenge-list">
<li class="wpforms-challenge-step1-item"><span></span><?php esc_html_e( 'Name Your Form', 'wpforms-lite' ); ?></li>
<li class="wpforms-challenge-step2-item"><span></span><?php esc_html_e( 'Select a Template', 'wpforms-lite' ); ?></li>
<li class="wpforms-challenge-step3-item"><span></span><?php esc_html_e( 'Add Fields to Your Form', 'wpforms-lite' ); ?></li>
<li class="wpforms-challenge-step4-item"><span></span><?php esc_html_e( 'Check Notifications', 'wpforms-lite' ); ?></li>
<li class="wpforms-challenge-step5-item"><span></span><?php esc_html_e( 'Embed in a Page', 'wpforms-lite' ); ?></li>
<li class="wpforms-challenge-completed"><span></span><?php esc_html_e( 'Challenge Complete', 'wpforms-lite' ); ?></li>
</ul>
</div>
<div class="wpforms-challenge-bar" style="display:none">
<div></div>
</div>
<div class="wpforms-challenge-block-timer">
<img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/challenge/sullie-circle.png' ); ?>" alt="<?php esc_html_e( 'Sullie the WPForms mascot', 'wpforms-lite' ); ?>">
<div>
<h3><?php esc_html_e( 'WPForms Challenge', 'wpforms-lite' ); ?></h3>
<p>
<?php
printf(
/* translators: %s - minutes in 2:00 format. */
esc_html__( '%s remaining', 'wpforms-lite' ),
'<span id="wpforms-challenge-timer">' . absint( $minutes ) . ':00</span>'
);
?>
</p>
</div>
</div>
<div class="wpforms-challenge-block-under-timer">
<?php if ( 'start' === $state ) : ?>
<a href="<?php echo esc_url( admin_url( 'admin.php?page=wpforms-builder' ) ); ?>" class="wpforms-btn wpforms-btn-md wpforms-btn-orange wpforms-challenge-start">
<?php esc_html_e( 'Start Challenge', 'wpforms-lite' ); ?>
</a>
<?php elseif ( 'progress' === $state ) : ?>
<button type="button" class="wpforms-btn wpforms-btn-md wpforms-btn-grey wpforms-challenge-pause"><?php esc_html_e( 'Pause', 'wpforms-lite' ); ?></button>
<button type="button" class="wpforms-btn wpforms-btn-md wpforms-btn-orange wpforms-challenge-resume" style="display: none;"><?php esc_html_e( 'Continue', 'wpforms-lite' ); ?></button>
<button type="button" class="wpforms-btn wpforms-btn-md wpforms-btn-orange wpforms-challenge-end" style="display: none;"><?php esc_html_e( 'End Challenge', 'wpforms-lite' ); ?></button>
<?php endif; ?>
</div>
</div>