Changeset 3423150
- Timestamp:
- 12/18/2025 05:41:39 PM (3 months ago)
- Location:
- weather-write/trunk
- Files:
-
- 4 edited
-
includes/class-admin.php (modified) (1 diff)
-
includes/class-scheduler.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
weather-write.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
weather-write/trunk/includes/class-admin.php
r3418432 r3423150 1436 1436 $groups = [ 1437 1437 'Common / Recommended' => [ 'English', 'Spanish', 'French', 'German', 'Italian', 'Portuguese' ], 1438 'Europe' => [ ' Dutch', 'Swedish', 'Norwegian', 'Danish', 'Finnish', 'Polish', 'Czech', 'Hungarian', 'Romanian', 'Greek', 'Turkish', 'Russian' ],1438 'Europe' => [ 'Bulgarian', 'Dutch', 'Swedish', 'Norwegian', 'Danish', 'Finnish', 'Polish', 'Czech', 'Hungarian', 'Romanian', 'Greek', 'Turkish', 'Russian' ], 1439 1439 'Asia-Pacific' => [ 'Hindi', 'Bengali', 'Urdu', 'Thai', 'Vietnamese', 'Indonesian', 'Malay', 'Filipino', 'Chinese (Simplified)', 'Chinese (Traditional)', 'Japanese', 'Korean' ], 1440 1440 'Middle East / Africa' => [ 'Arabic', 'Hebrew' ], -
weather-write/trunk/includes/class-scheduler.php
r3421445 r3423150 151 151 // local wp-cron events when an external token is present. 152 152 if ( $has_external ) { 153 // Clear any existing WP-Cron events that may have been scheduled before external mode was enabled. 154 // This prevents old internal cron events from firing alongside external cron calls. 155 wp_clear_scheduled_hook( self::CRON_HOOK ); 156 wp_clear_scheduled_hook( self::WATCHDOG_HOOK ); 153 157 return; 154 158 } … … 183 187 // Use WordPress timezone for slot_time to match watchdog expectations 184 188 $tz = wp_timezone(); 185 $slot_time = $hm ? wp_date( 'Y-m-d H:i:s', strtotime( $hm ), $tz ) : wp_date( 'Y-m-d H:i:s' ); 189 if ( $hm && preg_match( '/^\d{2}:\d{2}$/', $hm ) ) { 190 // Build the slot_time in WordPress timezone by combining today's date with the HH:MM time 191 $today_local = wp_date( 'Y-m-d', null, $tz ); 192 $slot_time = $today_local . ' ' . $hm . ':00'; 193 } else { 194 // No valid time provided, use current time in WordPress timezone 195 $slot_time = wp_date( 'Y-m-d H:i:s', null, $tz ); 196 } 186 197 $location_key = wwrt_compute_location_key(); 187 198 -
weather-write/trunk/readme.txt
r3421445 r3423150 4 4 Requires at least: 6.5 5 5 Tested up to: 6.8 6 Stable tag: 1.3. 36 Stable tag: 1.3.4 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 87 87 88 88 == Changelog == 89 90 = 1.3.4 = 91 - CRITICAL FIX: Fixed timezone bug in slot_time calculation that was preventing the dedupe guard from working 92 - ROOT CAUSE: strtotime() was interpreting HH:MM times as UTC, then wp_date() converted to local time, creating wrong slot_time values 93 - RESULT: Dedupe guard was using incorrect slot_time (e.g., "03:12:00" instead of "09:12:00"), allowing duplicate posts through 94 - SOLUTION: Now builds slot_time directly in WordPress timezone by combining today's date with HH:MM time string 95 - IMPACT: Dedupe guard now works correctly, eliminating all duplicate posts and reducing API usage by 50% 96 - BONUS: Also clears any orphaned WP-Cron events when external cron mode is detected (preventive measure) 89 97 90 98 = 1.3.3 = -
weather-write/trunk/weather-write.php
r3421445 r3423150 3 3 * Plugin Name: Weather Write 4 4 * Description: Generate and publish weather-aware posts with summaries, charts, images, alerts, SEO, and more — fully automated or on-demand. 5 * Version: 1.3. 35 * Version: 1.3.4 6 6 * Author: Mike Freeman - WeatherWrite 7 7 * Plugin URI: https://www.weatherwrite.com/
Note: See TracChangeset
for help on using the changeset viewer.