Plugin Directory

Changeset 3472076


Ignore:
Timestamp:
03/01/2026 01:21:36 PM (11 days ago)
Author:
derickschaefer
Message:

Update trunk to version 2.1.5

Location:
static-cache-wrangler/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • static-cache-wrangler/trunk/includes/class-stcw-asset-handler.php

    r3393954 r3472076  
    7070        $batch_size = 10;
    7171        $processed = 0;
     72        $failed = 0;
    7273       
    7374        // Process assets in batches
     
    8586                unset($assets[$key]);
    8687                $processed++;
     88            } else {
     89                // Drop failed URLs after retry attempts to avoid endless cron retries.
     90                unset($assets[$key]);
     91                $failed++;
    8792            }
    8893        }
     
    98103                wp_schedule_single_event(time() + 30, 'stcw_process_assets');
    99104            }
    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        }
    105111    }
    106112   
     
    355361    }
    356362}
     363
  • static-cache-wrangler/trunk/includes/class-stcw-core.php

    r3411660 r3472076  
    6565        wp_enqueue_script(
    6666            'stcw-auto-process',
    67             STCW_PLUGIN_URL . 'includes/js/auto-process.js',
     67            STCW_PLUGIN_URL . 'admin/js/auto-process.js',
    6868            [],
    6969            STCW_VERSION,
     
    304304    public static function clear_all_files() {
    305305        $static_dir = self::get_static_dir();
    306         $assets_dir = self::get_assets_dir();
    307306       
    308307        // Clear static directory
     
    388387
    389388        $static_dir = self::get_static_dir();
    390         $assets_dir = self::get_assets_dir();
    391389
    392390        // Add static files
    393391        if (is_dir($static_dir)) {
    394392            self::add_directory_to_zip($zip, $static_dir, '');
    395         }
    396 
    397         // Add assets
    398         if (is_dir($assets_dir)) {
    399             self::add_directory_to_zip($zip, $assets_dir, 'assets');
    400393        }
    401394
     
    438431    }
    439432}
     433
  • static-cache-wrangler/trunk/includes/class-stcw-generator.php

    r3434736 r3472076  
    155155        $assets = $this->extract_asset_urls($output);
    156156
    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
    158161        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
    162163            $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            }
    163169        }
    164170
     
    682688    }
    683689}
     690
  • static-cache-wrangler/trunk/readme.txt

    r3434736 r3472076  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 2.1.4
     7Stable tag: 2.1.5
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6969### Key Features
    7070
    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
     75Version 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.
    7676
    7777**What's Fixed in 2.1.3:**
     
    342342
    343343== 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.
    344350
    345351= 2.1.4 =
     
    674680== Upgrade Notice ==
    675681
     682= 2.1.5 =
     683Fixes asset processing reliability and ZIP packaging behavior. Recommended update for all users.
     684
    676685= 2.1.4 =
    677686Adds WordPress metadata injection to cached HTML files for improved headless CMS migration support. Backward compatible.
     
    802811**Interested in learning more about command-line interfaces and WP-CLI?** 
    803812Check out [ModernCLI.dev](https://moderncli.dev) — a practical guide to mastering modern CLI workflows.
     813
  • static-cache-wrangler/trunk/static-site.php

    r3434736 r3472076  
    44 * Plugin URI: https://moderncli.dev/code/static-cache-wrangler/
    55 * Description: Generate static HTML files with fully local CSS/JS/Images/Fonts
    6  * Version: 2.1.4
     6 * Version: 2.1.5
    77 * Author: Derick Schaefer
    88 * Author URI: https://moderncli.dev/author/
     
    1717
    1818// Plugin constants
    19 define('STCW_VERSION', '2.1.4');
     19define('STCW_VERSION', '2.1.5');
    2020define('STCW_PLUGIN_DIR', plugin_dir_path(__FILE__));
    2121define('STCW_PLUGIN_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.