Plugin Directory

Changeset 3442782


Ignore:
Timestamp:
01/19/2026 07:53:47 PM (2 months ago)
Author:
kturgutoglu
Message:

This version correctly outputs the verification message as an HTML comment on the first line of static pages.

Location:
static-porter/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • static-porter/trunk/readme.txt

    r3442769 r3442782  
    11=== Static Porter ===
    2 Contributors: KAYIHAN TURGUTOGLU, KAYA TURK
     2Contributors: Kayıhan Turgutoğlu, Kaya Turk
    33Donate link: https://www.paypal.me/kturgutoglu
    44Tags: static, cache, performance, speed, optimization
     
    66Tested up to: 6.9
    77Requires PHP: 7.0
    8 Stable tag: 3.5.4
     8Stable tag: 3.5.5
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4949== Upgrade Notice ==
    5050
    51 = 3.5.4 =
    52 This version introduces the new professional "Porter" branding, optimized UI, and a faster 5-second auto-refresh after crawling. Highly recommended for all users.
     51= 3.5.5 =
     52This version correctly outputs the verification message as an HTML comment on the first line of static pages.
    5353
    5454== Changelog ==
    55 
     55= 3.5.5 =
     56* **HTML Attribution Fix:** Correctly outputs the verification message as an HTML comment on the first line of static pages.
    5657= 3.5.4 =
    5758* **New Icon:** Updated plugin branding to a professional "Porter/Package" box icon.
  • static-porter/trunk/static-porter.php

    r3442759 r3442782  
    33 * Plugin Name: Static Porter
    44 * Description: High-performance static site generator with optional Gzip, Minification, Security Headers, and Cache-Control settings.
    5  * Version: 3.5.4
    6  * Author: KAYIHAN TURGUTOGLU, KAYA TURK
     5 * Version: 3.5.5
     6 * Author: Kayıhan Turgutoğlu, Kaya Turk
    77 * License: GPLv2 or later
    88 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    316316            }
    317317            $processed_msg = str_replace(['{version}', '{timestamp}'], [STATIC_PORTER_VERSION, current_time('mysql')], $msg_template);
    318             $attribution = "\n";
    319             $html = $attribution . ltrim($html);
     318            $attribution = "<!-- " . esc_html($processed_msg) . " -->\n";
     319
     320if (stripos($html, '<!DOCTYPE') === 0) {
     321    $html = preg_replace('/^<!DOCTYPE[^>]*>\s*/i', '$0' . $attribution, $html, 1);
     322} else {
     323    $html = $attribution . ltrim($html);
     324}
     325
    320326        }
    321327
Note: See TracChangeset for help on using the changeset viewer.