Changeset 3423974
- Timestamp:
- 12/19/2025 09:23:09 PM (2 months ago)
- Location:
- weather-write/trunk
- Files:
-
- 3 edited
-
includes/class-rest.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
weather-write.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
weather-write/trunk/includes/class-rest.php
r3393864 r3423974 73 73 74 74 public static function handle_trigger( WP_REST_Request $request ) { 75 // Verify token 75 // Verify token (can be in query string or body) 76 76 $token = sanitize_text_field( (string) $request->get_param( 'token' ) ); 77 77 $expected_token = defined( 'WWRT_CRONJOB_API_TOKEN' ) ? (string) WWRT_CRONJOB_API_TOKEN : ''; … … 81 81 } 82 82 83 // Get the time slot (optional - if not provided, runs immediately) 84 $time = sanitize_text_field( (string) $request->get_param( 'time' ) ); 83 // Get the time slot from JSON body (cron-job.org sends it here) 84 // get_param() reads from query string, but cron-job.org sends time in JSON body 85 $time = ''; 86 $body_params = $request->get_json_params(); 87 if ( is_array( $body_params ) && isset( $body_params['time'] ) ) { 88 $time = sanitize_text_field( (string) $body_params['time'] ); 89 } 90 // Fallback to query string/URL params if not in body 91 if ( empty( $time ) ) { 92 $time = sanitize_text_field( (string) $request->get_param( 'time' ) ); 93 } 85 94 86 95 // Trigger the post generation directly -
weather-write/trunk/readme.txt
r3423968 r3423974 4 4 Requires at least: 6.5 5 5 Tested up to: 6.8 6 Stable tag: 1.3. 96 Stable tag: 1.3.10 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.10 = 91 - CRITICAL FIX: Schedule-specific tags now correctly applied to posts triggered by cron-job.org 92 - Fixed REST API endpoint to properly read time parameter from JSON body 93 - Ensures tags like "Morning Weather Report" or "Evening Weather Report" are always included 89 94 90 95 = 1.3.9 = -
weather-write/trunk/weather-write.php
r3423968 r3423974 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. 95 * Version: 1.3.10 6 6 * Author: Mike Freeman - WeatherWrite 7 7 * Plugin URI: https://www.weatherwrite.com/
Note: See TracChangeset
for help on using the changeset viewer.