Changeset 3469811
- Timestamp:
- 02/26/2026 02:37:36 AM (12 days ago)
- Location:
- weather-write/trunk
- Files:
-
- 3 edited
-
includes/class-scheduler.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
weather-write.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
weather-write/trunk/includes/class-scheduler.php
r3455666 r3469811 359 359 do_action( 'wwrt_progress_step', 'validate', 'Configuration validated', true ); 360 360 361 // Fetch weather (extended forecast for special posts) 362 $forecast_days = 2; // Default: today + tomorrow 361 // Always fetch 7 days for the forecast table display 362 $forecast_days = 7; 363 364 // For special posts, store their configured forecast window for AI prompt use 365 $special_forecast_days = 7; // Default 363 366 if ( $special_post && isset( $special_post['forecast_days'] ) ) { 364 $ forecast_days = (int) $special_post['forecast_days'];365 if ( $ forecast_days < 1 ) { $forecast_days = 1; }366 if ( $ forecast_days > 14 ) { $forecast_days = 14; }367 $special_forecast_days = (int) $special_post['forecast_days']; 368 if ( $special_forecast_days < 1 ) { $special_forecast_days = 1; } 369 if ( $special_forecast_days > 14 ) { $special_forecast_days = 14; } 367 370 } 368 371 do_action( 'wwrt_progress_step', 'weather', 'Fetching weather data from Open-Meteo', false ); … … 467 470 if ( $special_post ) { 468 471 // Calculate date range and location for variable replacement 469 $forecast_days = isset( $special_post['forecast_days'] ) ? (int) $special_post['forecast_days'] : 3;472 // Use the special post's configured forecast window (not the 7-day table default) 470 473 $forecast_start = isset( $special_post['forecast_start'] ) ? $special_post['forecast_start'] : 'tomorrow'; 471 474 $start_offset = $forecast_start === 'today' ? 0 : 1; 472 475 $start_date = new DateTime( '+' . $start_offset . ' days', wp_timezone() ); 473 $end_date = new DateTime( '+' . ( $start_offset + $ forecast_days - 1 ) . ' days', wp_timezone() );476 $end_date = new DateTime( '+' . ( $start_offset + $special_forecast_days - 1 ) . ' days', wp_timezone() ); 474 477 $date_range = $start_date->format( 'M j' ) . '-' . $end_date->format( 'j' ); 475 478 … … 1213 1216 $tmin = isset( $daily['tmin'] ) ? (array) $daily['tmin'] : []; 1214 1217 $codes = isset( $daily['code'] ) ? (array) $daily['code'] : []; 1218 1215 1219 1216 1220 $temp_unit = isset( $options['temp_unit'] ) ? strtolower( (string) $options['temp_unit'] ) : 'c'; -
weather-write/trunk/readme.txt
r3455666 r3469811 4 4 Requires at least: 6.5 5 5 Tested up to: 6.8 6 Stable tag: 1.3.1 86 Stable tag: 1.3.19 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.19 = 91 - Fixed: 7-Day Forecast now always displays all 7 days regardless of Special Post forecast configuration 92 - Improved: Special Posts maintain their configured forecast window for AI content while showing full 7-day table 89 93 90 94 = 1.3.18 = -
weather-write/trunk/weather-write.php
r3455666 r3469811 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.1 85 * Version: 1.3.19 6 6 * Author: Mike Freeman - WeatherWrite 7 7 * Plugin URI: https://www.weatherwrite.com/
Note: See TracChangeset
for help on using the changeset viewer.