Changeset 3472076
- Timestamp:
- 03/01/2026 01:21:36 PM (11 days ago)
- Location:
- static-cache-wrangler/trunk
- Files:
-
- 5 edited
-
includes/class-stcw-asset-handler.php (modified) (4 diffs)
-
includes/class-stcw-core.php (modified) (4 diffs)
-
includes/class-stcw-generator.php (modified) (2 diffs)
-
readme.txt (modified) (5 diffs)
-
static-site.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
static-cache-wrangler/trunk/includes/class-stcw-asset-handler.php
r3393954 r3472076 70 70 $batch_size = 10; 71 71 $processed = 0; 72 $failed = 0; 72 73 73 74 // Process assets in batches … … 85 86 unset($assets[$key]); 86 87 $processed++; 88 } else { 89 // Drop failed URLs after retry attempts to avoid endless cron retries. 90 unset($assets[$key]); 91 $failed++; 87 92 } 88 93 } … … 98 103 wp_schedule_single_event(time() + 30, 'stcw_process_assets'); 99 104 } 100 } 101 // Profiler hook – end async batch 102 if (defined('STCW_PROFILING_ENABLED') && STCW_PROFILING_ENABLED) { 103 do_action('stcw_after_asset_batch', $processed, $failed); 104 } 105 } 106 107 // Profiler hook – end async batch 108 if (defined('STCW_PROFILING_ENABLED') && STCW_PROFILING_ENABLED) { 109 do_action('stcw_after_asset_batch', $processed, $failed); 110 } 105 111 } 106 112 … … 355 361 } 356 362 } 363 -
static-cache-wrangler/trunk/includes/class-stcw-core.php
r3411660 r3472076 65 65 wp_enqueue_script( 66 66 'stcw-auto-process', 67 STCW_PLUGIN_URL . ' includes/js/auto-process.js',67 STCW_PLUGIN_URL . 'admin/js/auto-process.js', 68 68 [], 69 69 STCW_VERSION, … … 304 304 public static function clear_all_files() { 305 305 $static_dir = self::get_static_dir(); 306 $assets_dir = self::get_assets_dir();307 306 308 307 // Clear static directory … … 388 387 389 388 $static_dir = self::get_static_dir(); 390 $assets_dir = self::get_assets_dir();391 389 392 390 // Add static files 393 391 if (is_dir($static_dir)) { 394 392 self::add_directory_to_zip($zip, $static_dir, ''); 395 }396 397 // Add assets398 if (is_dir($assets_dir)) {399 self::add_directory_to_zip($zip, $assets_dir, 'assets');400 393 } 401 394 … … 438 431 } 439 432 } 433 -
static-cache-wrangler/trunk/includes/class-stcw-generator.php
r3434736 r3472076 155 155 $assets = $this->extract_asset_urls($output); 156 156 157 // Process assets asynchronously if enabled 157 // Rewrite asset paths to local assets directory for static output 158 $static_output = $this->rewrite_asset_paths($static_output); 159 160 // Process assets based on configured mode 158 161 if (STCW_ASYNC_ASSETS) { 159 // Rewrite asset paths 160 $static_output = $this->rewrite_asset_paths($static_output); 161 // Queue assets for download 162 // Queue assets for background download 162 163 $this->asset_handler->queue_asset_downloads($assets); 164 } else { 165 // Process immediately when async mode is disabled 166 foreach ($assets as $asset_url) { 167 $this->asset_handler->download_to_assets($asset_url); 168 } 163 169 } 164 170 … … 682 688 } 683 689 } 690 -
static-cache-wrangler/trunk/readme.txt
r3434736 r3472076 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 2.1. 47 Stable tag: 2.1.5 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 69 69 ### Key Features 70 70 71 **What's New in 2.1. 2:**72 73 = 2.1. 4=74 75 Version 2.1. 4 adds STCW_META comment injection with WordPress post data (ID, post_type, permalink, dates, template) to support upcoming Headless Assistant companion plugin.71 **What's New in 2.1.5:** 72 73 = 2.1.5 = 74 75 Version 2.1.5 fixes auto asset processing script loading, ensures `STCW_ASYNC_ASSETS` false mode processes assets immediately, prevents endless retries for failed asset downloads, and removes duplicate assets in ZIP exports. 76 76 77 77 **What's Fixed in 2.1.3:** … … 342 342 343 343 == Changelog == 344 345 = 2.1.5 = 346 * **FIX:** Corrected auto asset processing script path so background processing loads reliably. 347 * **FIX:** `STCW_ASYNC_ASSETS` set to false now processes assets immediately during page generation. 348 * **FIX:** Failed asset downloads are removed from queue after retries to avoid endless cron reprocessing. 349 * **FIX:** ZIP exports no longer duplicate assets already included via static directory packaging. 344 350 345 351 = 2.1.4 = … … 674 680 == Upgrade Notice == 675 681 682 = 2.1.5 = 683 Fixes asset processing reliability and ZIP packaging behavior. Recommended update for all users. 684 676 685 = 2.1.4 = 677 686 Adds WordPress metadata injection to cached HTML files for improved headless CMS migration support. Backward compatible. … … 802 811 **Interested in learning more about command-line interfaces and WP-CLI?** 803 812 Check out [ModernCLI.dev](https://moderncli.dev) — a practical guide to mastering modern CLI workflows. 813 -
static-cache-wrangler/trunk/static-site.php
r3434736 r3472076 4 4 * Plugin URI: https://moderncli.dev/code/static-cache-wrangler/ 5 5 * Description: Generate static HTML files with fully local CSS/JS/Images/Fonts 6 * Version: 2.1. 46 * Version: 2.1.5 7 7 * Author: Derick Schaefer 8 8 * Author URI: https://moderncli.dev/author/ … … 17 17 18 18 // Plugin constants 19 define('STCW_VERSION', '2.1. 4');19 define('STCW_VERSION', '2.1.5'); 20 20 define('STCW_PLUGIN_DIR', plugin_dir_path(__FILE__)); 21 21 define('STCW_PLUGIN_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset
for help on using the changeset viewer.