Plugin Directory

Changeset 3418566


Ignore:
Timestamp:
12/12/2025 10:37:06 PM (3 months ago)
Author:
derickschaefer
Message:

Update trunk to version 2.1.2

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

Legend:

Unmodified
Added
Removed
  • static-cache-wrangler/trunk/admin/views/admin-page.php

    r3408462 r3418566  
    133133        <div class="stcw-main-content">
    134134
    135             <!-- File System Locations Panel -->
    136             <div class="stcw-card">
    137                 <h2 class="stcw-panel-title"><?php esc_html_e('File System Locations', 'static-cache-wrangler'); ?></h2>
    138                 <table class="widefat">
     135            <!-- Configuration & File System Panel -->
     136            <div class="stcw-card">
     137                <h2 class="stcw-panel-title"><?php esc_html_e('Configuration & File System', 'static-cache-wrangler'); ?></h2>
     138               
     139                <!-- Configuration Variables Section -->
     140                <h3 style="margin-top:0;margin-bottom:10px;font-size:13px;font-weight:600;color:#646970;"><?php esc_html_e('Configuration', 'static-cache-wrangler'); ?></h3>
     141                <table class="widefat" style="margin-bottom:20px;">
    139142                    <tbody>
     143                        <?php
     144                        // Get cache TTL value
     145                        $stcw_cache_ttl = defined('STCW_CACHE_TTL') ? STCW_CACHE_TTL : 86400;
     146                        $stcw_ttl_is_default = ($stcw_cache_ttl === 86400);
     147                       
     148                        // Format TTL display
     149                        if ($stcw_cache_ttl === 0) {
     150                            $stcw_ttl_display = esc_html__('Never expires', 'static-cache-wrangler') . ' ' . esc_html__('(custom: 0s)', 'static-cache-wrangler');
     151                        } elseif ($stcw_cache_ttl < 3600) {
     152                            $stcw_minutes = round($stcw_cache_ttl / 60);
     153                            $stcw_ttl_display = sprintf(
     154                                /* translators: %d: number of minutes */
     155                                esc_html(_n('%d minute', '%d minutes', $stcw_minutes, 'static-cache-wrangler')),
     156                                $stcw_minutes
     157                            );
     158                            if (!$stcw_ttl_is_default) {
     159                                /* translators: %d: cache TTL value in seconds */
     160                                $stcw_ttl_display .= ' ' . sprintf(esc_html__('(custom: %ds)', 'static-cache-wrangler'), $stcw_cache_ttl);
     161                            }
     162                        } elseif ($stcw_cache_ttl < 86400) {
     163                            $stcw_hours = round($stcw_cache_ttl / 3600);
     164                            $stcw_ttl_display = sprintf(
     165                                /* translators: %d: number of hours */
     166                                esc_html(_n('%d hour', '%d hours', $stcw_hours, 'static-cache-wrangler')),
     167                                $stcw_hours
     168                            );
     169                            if (!$stcw_ttl_is_default) {
     170                                /* translators: %d: cache TTL value in seconds */
     171                                $stcw_ttl_display .= ' ' . sprintf(esc_html__('(custom: %ds)', 'static-cache-wrangler'), $stcw_cache_ttl);
     172                            }
     173                        } elseif ($stcw_cache_ttl < 604800) {
     174                            $stcw_days = round($stcw_cache_ttl / 86400);
     175                            $stcw_ttl_display = sprintf(
     176                                /* translators: %d: number of days */
     177                                esc_html(_n('%d day', '%d days', $stcw_days, 'static-cache-wrangler')),
     178                                $stcw_days
     179                            );
     180                            if (!$stcw_ttl_is_default) {
     181                                /* translators: %d: cache TTL value in seconds */
     182                                $stcw_ttl_display .= ' ' . sprintf(esc_html__('(custom: %ds)', 'static-cache-wrangler'), $stcw_cache_ttl);
     183                            }
     184                        } else {
     185                            $stcw_weeks = round($stcw_cache_ttl / 604800);
     186                            $stcw_ttl_display = sprintf(
     187                                /* translators: %d: number of weeks */
     188                                esc_html(_n('%d week', '%d weeks', $stcw_weeks, 'static-cache-wrangler')),
     189                                $stcw_weeks
     190                            );
     191                            /* translators: %d: cache TTL value in seconds */
     192                            $stcw_ttl_display .= ' ' . sprintf(esc_html__('(custom: %ds)', 'static-cache-wrangler'), $stcw_cache_ttl);
     193                        }
     194                       
     195                        if ($stcw_ttl_is_default) {
     196                            $stcw_ttl_display .= ' ' . esc_html__('(default)', 'static-cache-wrangler');
     197                        }
     198                       
     199                        // Get sitemap URL - show actual URL instead of generic "WordPress URL"
     200                        $stcw_sitemap_url = defined('STCW_SITEMAP_URL') ? STCW_SITEMAP_URL : '';
     201                        $stcw_site_url = home_url(); // Get actual WordPress URL
     202                       
     203                        // If custom URL is set and not empty, use it
     204                        // Otherwise, show the actual default URL that will be used
     205                        if (!empty($stcw_sitemap_url)) {
     206                            $stcw_sitemap_display = '<code>' . esc_html($stcw_sitemap_url) . '</code> ' . esc_html__('(custom)', 'static-cache-wrangler');
     207                        } else {
     208                            $stcw_sitemap_display = '<code>' . esc_html($stcw_site_url) . '</code> ' . esc_html__('(default)', 'static-cache-wrangler');
     209                        }
     210                       
     211                        // Get async assets setting
     212                        $stcw_async_enabled = defined('STCW_ASYNC_ASSETS') ? STCW_ASYNC_ASSETS : true;
     213                        $stcw_async_is_default = ($stcw_async_enabled === true);
     214                        ?>
     215                        <tr>
     216                            <td style="width:220px;"><strong><?php esc_html_e('Cache TTL', 'static-cache-wrangler'); ?></strong></td>
     217                            <td><?php echo wp_kses_post($stcw_ttl_display); ?></td>
     218                        </tr>
     219                        <tr class="alternate">
     220                            <td><strong><?php esc_html_e('Sitemap URL', 'static-cache-wrangler'); ?></strong></td>
     221                            <td><?php echo wp_kses_post($stcw_sitemap_display); ?></td>
     222                        </tr>
     223                        <tr>
     224                            <td><strong><?php esc_html_e('Async Assets', 'static-cache-wrangler'); ?></strong></td>
     225                            <td>
     226                                <?php if ($stcw_async_enabled): ?>
     227                                    <span class="stcw-ok">✓ <?php esc_html_e('Enabled', 'static-cache-wrangler'); ?></span>
     228                                    <?php if ($stcw_async_is_default): ?>
     229                                        <?php echo esc_html__('(default)', 'static-cache-wrangler'); ?>
     230                                    <?php else: ?>
     231                                        <?php echo esc_html__('(custom)', 'static-cache-wrangler'); ?>
     232                                    <?php endif; ?>
     233                                <?php else: ?>
     234                                    <span class="stcw-bad">✗ <?php esc_html_e('Disabled', 'static-cache-wrangler'); ?></span>
     235                                    <?php echo esc_html__('(custom)', 'static-cache-wrangler'); ?>
     236                                <?php endif; ?>
     237                            </td>
     238                        </tr>
    140239                        <?php if ($stcw_is_multisite): ?>
    141                         <tr>
    142                             <td style="width:220px;"><strong><?php esc_html_e('Multisite', 'static-cache-wrangler'); ?></strong></td>
     240                        <tr class="alternate">
     241                            <td><strong><?php esc_html_e('Multisite', 'static-cache-wrangler'); ?></strong></td>
    143242                            <td>
    144243                                <span class="stcw-ok">✓ <?php esc_html_e('Yes', 'static-cache-wrangler'); ?></span>
     
    153252                        </tr>
    154253                        <?php endif; ?>
    155                         <tr <?php echo $stcw_is_multisite ? '' : 'class="alternate"'; ?>>
     254                    </tbody>
     255                </table>
     256               
     257                <!-- File System Section -->
     258                <h3 style="margin-top:0;margin-bottom:10px;font-size:13px;font-weight:600;color:#646970;"><?php esc_html_e('File System', 'static-cache-wrangler'); ?></h3>
     259                <table class="widefat">
     260                    <tbody>
     261                        <tr>
    156262                            <td style="width:220px;"><strong><?php esc_html_e('Static Files', 'static-cache-wrangler'); ?></strong></td>
    157263                            <td><code><?php echo esc_html($stcw_static_dir); ?></code></td>
  • static-cache-wrangler/trunk/readme.txt

    r3411660 r3418566  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 2.1.1
     7Stable tag: 2.1.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6868
    6969### Key Features
     70
     71**What's New in 2.1.1:**
     72
     73= 2.1.2 =
     74
     75Version 2.1.2 introduces **configuration details** in addition to **file locations** on a key admin card.
    7076
    7177**What's New in 2.1.1:**
     
    324330
    325331== Changelog ==
     332
     333= 2.1.2 =
     334* **NEW:** Added configuration details in addition to file locations on main admin card
    326335
    327336= 2.1.1 =
  • static-cache-wrangler/trunk/static-site.php

    r3411660 r3418566  
    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.1
     6 * Version: 2.1.2
    77 * Author: Derick Schaefer
    88 * Author URI: https://moderncli.dev/author/
Note: See TracChangeset for help on using the changeset viewer.