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:
+16
File diff suppressed because one or more lines are too long
+10
@@ -0,0 +1,10 @@
|
||||
/*!
|
||||
* chartjs-adapter-moment v1.0.1
|
||||
* https://www.chartjs.org
|
||||
* (c) 2022 chartjs-adapter-moment Contributors
|
||||
* Released under the MIT license
|
||||
*
|
||||
* NOTE: This file was modified. Chart object was renamed to WPMailSMTPChart, to prevent JS library conflicts with other plugins.
|
||||
* "Chart" was replaced with "WPMailSMTPChart" 1 time in this file.
|
||||
*/
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("moment"),require("chart.js")):"function"==typeof define&&define.amd?define(["moment","chart.js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).moment,e.WPMailSMTPChart)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=n(e);const a={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};t._adapters._date.override("function"==typeof f.default?{_id:"moment",formats:function(){return a},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=f.default(e,t):e instanceof f.default||(e=f.default(e)),e.isValid()?e.valueOf():null},format:function(e,t){return f.default(e).format(t)},add:function(e,t,n){return f.default(e).add(t,n).valueOf()},diff:function(e,t,n){return f.default(e).diff(f.default(t),n)},startOf:function(e,t,n){return e=f.default(e),"isoWeek"===t?(n=Math.trunc(Math.min(Math.max(0,n),6)),e.isoWeekday(n).startOf("day").valueOf()):e.startOf(t).valueOf()},endOf:function(e,t){return f.default(e).endOf(t).valueOf()}}:{})}));
|
||||
+2
File diff suppressed because one or more lines are too long
+10
File diff suppressed because one or more lines are too long
+388
@@ -0,0 +1,388 @@
|
||||
/**
|
||||
* jquery-match-height 0.7.2 by @liabru
|
||||
* http://brm.io/jquery-match-height/
|
||||
* License: MIT
|
||||
*/
|
||||
|
||||
;(function(factory) { // eslint-disable-line no-extra-semi
|
||||
'use strict';
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof module !== 'undefined' && module.exports) {
|
||||
// CommonJS
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
// Global
|
||||
factory(jQuery);
|
||||
}
|
||||
})(function($) {
|
||||
/*
|
||||
* internal
|
||||
*/
|
||||
|
||||
var _previousResizeWidth = -1,
|
||||
_updateTimeout = -1;
|
||||
|
||||
/*
|
||||
* _parse
|
||||
* value parse utility function
|
||||
*/
|
||||
|
||||
var _parse = function(value) {
|
||||
// parse value and convert NaN to 0
|
||||
return parseFloat(value) || 0;
|
||||
};
|
||||
|
||||
/*
|
||||
* _rows
|
||||
* utility function returns array of jQuery selections representing each row
|
||||
* (as displayed after float wrapping applied by browser)
|
||||
*/
|
||||
|
||||
var _rows = function(elements) {
|
||||
var tolerance = 1,
|
||||
$elements = $(elements),
|
||||
lastTop = null,
|
||||
rows = [];
|
||||
|
||||
// group elements by their top position
|
||||
$elements.each(function(){
|
||||
var $that = $(this),
|
||||
top = $that.offset().top - _parse($that.css('margin-top')),
|
||||
lastRow = rows.length > 0 ? rows[rows.length - 1] : null;
|
||||
|
||||
if (lastRow === null) {
|
||||
// first item on the row, so just push it
|
||||
rows.push($that);
|
||||
} else {
|
||||
// if the row top is the same, add to the row group
|
||||
if (Math.floor(Math.abs(lastTop - top)) <= tolerance) {
|
||||
rows[rows.length - 1] = lastRow.add($that);
|
||||
} else {
|
||||
// otherwise start a new row group
|
||||
rows.push($that);
|
||||
}
|
||||
}
|
||||
|
||||
// keep track of the last row top
|
||||
lastTop = top;
|
||||
});
|
||||
|
||||
return rows;
|
||||
};
|
||||
|
||||
/*
|
||||
* _parseOptions
|
||||
* handle plugin options
|
||||
*/
|
||||
|
||||
var _parseOptions = function(options) {
|
||||
var opts = {
|
||||
byRow: true,
|
||||
property: 'height',
|
||||
target: null,
|
||||
remove: false
|
||||
};
|
||||
|
||||
if (typeof options === 'object') {
|
||||
return $.extend(opts, options);
|
||||
}
|
||||
|
||||
if (typeof options === 'boolean') {
|
||||
opts.byRow = options;
|
||||
} else if (options === 'remove') {
|
||||
opts.remove = true;
|
||||
}
|
||||
|
||||
return opts;
|
||||
};
|
||||
|
||||
/*
|
||||
* matchHeight
|
||||
* plugin definition
|
||||
*/
|
||||
|
||||
var matchHeight = $.fn.matchHeight = function(options) {
|
||||
var opts = _parseOptions(options);
|
||||
|
||||
// handle remove
|
||||
if (opts.remove) {
|
||||
var that = this;
|
||||
|
||||
// remove fixed height from all selected elements
|
||||
this.css(opts.property, '');
|
||||
|
||||
// remove selected elements from all groups
|
||||
$.each(matchHeight._groups, function(key, group) {
|
||||
group.elements = group.elements.not(that);
|
||||
});
|
||||
|
||||
// TODO: cleanup empty groups
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
if (this.length <= 1 && !opts.target) {
|
||||
return this;
|
||||
}
|
||||
|
||||
// keep track of this group so we can re-apply later on load and resize events
|
||||
matchHeight._groups.push({
|
||||
elements: this,
|
||||
options: opts
|
||||
});
|
||||
|
||||
// match each element's height to the tallest element in the selection
|
||||
matchHeight._apply(this, opts);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/*
|
||||
* plugin global options
|
||||
*/
|
||||
|
||||
matchHeight.version = '0.7.2';
|
||||
matchHeight._groups = [];
|
||||
matchHeight._throttle = 80;
|
||||
matchHeight._maintainScroll = false;
|
||||
matchHeight._beforeUpdate = null;
|
||||
matchHeight._afterUpdate = null;
|
||||
matchHeight._rows = _rows;
|
||||
matchHeight._parse = _parse;
|
||||
matchHeight._parseOptions = _parseOptions;
|
||||
|
||||
/*
|
||||
* matchHeight._apply
|
||||
* apply matchHeight to given elements
|
||||
*/
|
||||
|
||||
matchHeight._apply = function(elements, options) {
|
||||
var opts = _parseOptions(options),
|
||||
$elements = $(elements),
|
||||
rows = [$elements];
|
||||
|
||||
// take note of scroll position
|
||||
var scrollTop = $(window).scrollTop(),
|
||||
htmlHeight = $('html').outerHeight(true);
|
||||
|
||||
// get hidden parents
|
||||
var $hiddenParents = $elements.parents().filter(':hidden');
|
||||
|
||||
// cache the original inline style
|
||||
$hiddenParents.each(function() {
|
||||
var $that = $(this);
|
||||
$that.data('style-cache', $that.attr('style'));
|
||||
});
|
||||
|
||||
// temporarily must force hidden parents visible
|
||||
$hiddenParents.css('display', 'block');
|
||||
|
||||
// get rows if using byRow, otherwise assume one row
|
||||
if (opts.byRow && !opts.target) {
|
||||
|
||||
// must first force an arbitrary equal height so floating elements break evenly
|
||||
$elements.each(function() {
|
||||
var $that = $(this),
|
||||
display = $that.css('display');
|
||||
|
||||
// temporarily force a usable display value
|
||||
if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
|
||||
display = 'block';
|
||||
}
|
||||
|
||||
// cache the original inline style
|
||||
$that.data('style-cache', $that.attr('style'));
|
||||
|
||||
$that.css({
|
||||
'display': display,
|
||||
'padding-top': '0',
|
||||
'padding-bottom': '0',
|
||||
'margin-top': '0',
|
||||
'margin-bottom': '0',
|
||||
'border-top-width': '0',
|
||||
'border-bottom-width': '0',
|
||||
'height': '100px',
|
||||
'overflow': 'hidden'
|
||||
});
|
||||
});
|
||||
|
||||
// get the array of rows (based on element top position)
|
||||
rows = _rows($elements);
|
||||
|
||||
// revert original inline styles
|
||||
$elements.each(function() {
|
||||
var $that = $(this);
|
||||
$that.attr('style', $that.data('style-cache') || '');
|
||||
});
|
||||
}
|
||||
|
||||
$.each(rows, function(key, row) {
|
||||
var $row = $(row),
|
||||
targetHeight = 0;
|
||||
|
||||
if (!opts.target) {
|
||||
// skip apply to rows with only one item
|
||||
if (opts.byRow && $row.length <= 1) {
|
||||
$row.css(opts.property, '');
|
||||
return;
|
||||
}
|
||||
|
||||
// iterate the row and find the max height
|
||||
$row.each(function(){
|
||||
var $that = $(this),
|
||||
style = $that.attr('style'),
|
||||
display = $that.css('display');
|
||||
|
||||
// temporarily force a usable display value
|
||||
if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
|
||||
display = 'block';
|
||||
}
|
||||
|
||||
// ensure we get the correct actual height (and not a previously set height value)
|
||||
var css = { 'display': display };
|
||||
css[opts.property] = '';
|
||||
$that.css(css);
|
||||
|
||||
// find the max height (including padding, but not margin)
|
||||
if ($that.outerHeight(false) > targetHeight) {
|
||||
targetHeight = $that.outerHeight(false);
|
||||
}
|
||||
|
||||
// revert styles
|
||||
if (style) {
|
||||
$that.attr('style', style);
|
||||
} else {
|
||||
$that.css('display', '');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// if target set, use the height of the target element
|
||||
targetHeight = opts.target.outerHeight(false);
|
||||
}
|
||||
|
||||
// iterate the row and apply the height to all elements
|
||||
$row.each(function(){
|
||||
var $that = $(this),
|
||||
verticalPadding = 0;
|
||||
|
||||
// don't apply to a target
|
||||
if (opts.target && $that.is(opts.target)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// handle padding and border correctly (required when not using border-box)
|
||||
if ($that.css('box-sizing') !== 'border-box') {
|
||||
verticalPadding += _parse($that.css('border-top-width')) + _parse($that.css('border-bottom-width'));
|
||||
verticalPadding += _parse($that.css('padding-top')) + _parse($that.css('padding-bottom'));
|
||||
}
|
||||
|
||||
// set the height (accounting for padding and border)
|
||||
$that.css(opts.property, (targetHeight - verticalPadding) + 'px');
|
||||
});
|
||||
});
|
||||
|
||||
// revert hidden parents
|
||||
$hiddenParents.each(function() {
|
||||
var $that = $(this);
|
||||
$that.attr('style', $that.data('style-cache') || null);
|
||||
});
|
||||
|
||||
// restore scroll position if enabled
|
||||
if (matchHeight._maintainScroll) {
|
||||
$(window).scrollTop((scrollTop / htmlHeight) * $('html').outerHeight(true));
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/*
|
||||
* matchHeight._applyDataApi
|
||||
* applies matchHeight to all elements with a data-match-height attribute
|
||||
*/
|
||||
|
||||
matchHeight._applyDataApi = function() {
|
||||
var groups = {};
|
||||
|
||||
// generate groups by their groupId set by elements using data-match-height
|
||||
$('[data-match-height], [data-mh]').each(function() {
|
||||
var $this = $(this),
|
||||
groupId = $this.attr('data-mh') || $this.attr('data-match-height');
|
||||
|
||||
if (groupId in groups) {
|
||||
groups[groupId] = groups[groupId].add($this);
|
||||
} else {
|
||||
groups[groupId] = $this;
|
||||
}
|
||||
});
|
||||
|
||||
// apply matchHeight to each group
|
||||
$.each(groups, function() {
|
||||
this.matchHeight(true);
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
* matchHeight._update
|
||||
* updates matchHeight on all current groups with their correct options
|
||||
*/
|
||||
|
||||
var _update = function(event) {
|
||||
if (matchHeight._beforeUpdate) {
|
||||
matchHeight._beforeUpdate(event, matchHeight._groups);
|
||||
}
|
||||
|
||||
$.each(matchHeight._groups, function() {
|
||||
matchHeight._apply(this.elements, this.options);
|
||||
});
|
||||
|
||||
if (matchHeight._afterUpdate) {
|
||||
matchHeight._afterUpdate(event, matchHeight._groups);
|
||||
}
|
||||
};
|
||||
|
||||
matchHeight._update = function(throttle, event) {
|
||||
// prevent update if fired from a resize event
|
||||
// where the viewport width hasn't actually changed
|
||||
// fixes an event looping bug in IE8
|
||||
if (event && event.type === 'resize') {
|
||||
var windowWidth = $(window).width();
|
||||
if (windowWidth === _previousResizeWidth) {
|
||||
return;
|
||||
}
|
||||
_previousResizeWidth = windowWidth;
|
||||
}
|
||||
|
||||
// throttle updates
|
||||
if (!throttle) {
|
||||
_update(event);
|
||||
} else if (_updateTimeout === -1) {
|
||||
_updateTimeout = setTimeout(function() {
|
||||
_update(event);
|
||||
_updateTimeout = -1;
|
||||
}, matchHeight._throttle);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* bind events
|
||||
*/
|
||||
|
||||
// apply on DOM ready event
|
||||
$(matchHeight._applyDataApi);
|
||||
|
||||
// use on or bind where supported
|
||||
var on = $.fn.on ? 'on' : 'bind';
|
||||
|
||||
// update heights on load and resize events
|
||||
$(window)[on]('load', function(event) {
|
||||
matchHeight._update(false, event);
|
||||
});
|
||||
|
||||
// throttled update heights on resize events
|
||||
$(window)[on]('resize orientationchange', function(event) {
|
||||
matchHeight._update(true, event);
|
||||
});
|
||||
|
||||
});
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(l){function c(t){return parseFloat(t)||0}function h(t){var e=l(t),n=null,a=[];return e.each(function(){var t=l(this),e=t.offset().top-c(t.css("margin-top")),o=0<a.length?a[a.length-1]:null;null!==o&&Math.floor(Math.abs(n-e))<=1?a[a.length-1]=o.add(t):a.push(t),n=e}),a}function p(t){var e={byRow:!0,property:"height",target:null,remove:!1};return"object"==typeof t?l.extend(e,t):("boolean"==typeof t?e.byRow=t:"remove"===t&&(e.remove=!0),e)}var n=-1,a=-1,d=l.fn.matchHeight=function(t){var e=p(t);if(e.remove){var o=this;return this.css(e.property,""),l.each(d._groups,function(t,e){e.elements=e.elements.not(o)}),this}return this.length<=1&&!e.target||(d._groups.push({elements:this,options:e}),d._apply(this,e)),this};d.version="0.7.2",d._groups=[],d._throttle=80,d._maintainScroll=!1,d._beforeUpdate=null,d._afterUpdate=null,d._rows=h,d._parse=c,d._parseOptions=p,d._apply=function(t,e){var i=p(e),o=l(t),n=[o],a=l(window).scrollTop(),r=l("html").outerHeight(!0),s=o.parents().filter(":hidden");return s.each(function(){var t=l(this);t.data("style-cache",t.attr("style"))}),s.css("display","block"),i.byRow&&!i.target&&(o.each(function(){var t=l(this),e=t.css("display");"inline-block"!==e&&"flex"!==e&&"inline-flex"!==e&&(e="block"),t.data("style-cache",t.attr("style")),t.css({display:e,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"})}),n=h(o),o.each(function(){var t=l(this);t.attr("style",t.data("style-cache")||"")})),l.each(n,function(t,e){var o=l(e),a=0;if(i.target)a=i.target.outerHeight(!1);else{if(i.byRow&&o.length<=1)return void o.css(i.property,"");o.each(function(){var t=l(this),e=t.attr("style"),o=t.css("display");"inline-block"!==o&&"flex"!==o&&"inline-flex"!==o&&(o="block");var n={display:o};n[i.property]="",t.css(n),t.outerHeight(!1)>a&&(a=t.outerHeight(!1)),e?t.attr("style",e):t.css("display","")})}o.each(function(){var t=l(this),e=0;i.target&&t.is(i.target)||("border-box"!==t.css("box-sizing")&&(e+=c(t.css("border-top-width"))+c(t.css("border-bottom-width")),e+=c(t.css("padding-top"))+c(t.css("padding-bottom"))),t.css(i.property,a-e+"px"))})}),s.each(function(){var t=l(this);t.attr("style",t.data("style-cache")||null)}),d._maintainScroll&&l(window).scrollTop(a/r*l("html").outerHeight(!0)),this},d._applyDataApi=function(){var o={};l("[data-match-height], [data-mh]").each(function(){var t=l(this),e=t.attr("data-mh")||t.attr("data-match-height");o[e]=e in o?o[e].add(t):t}),l.each(o,function(){this.matchHeight(!0)})};function i(t){d._beforeUpdate&&d._beforeUpdate(t,d._groups),l.each(d._groups,function(){d._apply(this.elements,this.options)}),d._afterUpdate&&d._afterUpdate(t,d._groups)}d._update=function(t,e){if(e&&"resize"===e.type){var o=l(window).width();if(o===n)return;n=o}t?-1===a&&(a=setTimeout(function(){i(e),a=-1},d._throttle)):i(e)},l(d._applyDataApi);var t=l.fn.on?"on":"bind";l(window)[t]("load",function(t){d._update(!1,t)}),l(window)[t]("resize orientationchange",function(t){d._update(!0,t)})});
|
||||
+5
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user