Plugin Directory

Changeset 3474688


Ignore:
Timestamp:
03/04/2026 03:34:12 PM (4 weeks ago)
Author:
recorp
Message:

Updating version 6.0.4

Location:
export-wp-page-to-static-html/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • export-wp-page-to-static-html/trunk/README.txt

    r3474667 r3474688  
    55Tested up to:       6.7
    66Requires PHP:       7.4
    7 Stable tag:         6.0.3
     7Stable tag:         6.0.4
    88License:            GPLv2 or later
    99License URI:        https://www.gnu.org/licenses/gpl-2.0.html
  • export-wp-page-to-static-html/trunk/export-wp-page-to-static-html.php

    r3474667 r3474688  
    44 * Plugin URI:        https://myrecorp.com
    55 * Description:       Export WP Pages to Static HTML is the most flexible static HTML export plugin for WordPress. Unlike full-site generators, Export WP Pages to Static HTML gives you surgical control — export exactly the posts, pages, or custom post types you need, in the status you want, as the user role you choose.
    6  * Version:           6.0.3
     6 * Version:           6.0.4
    77 * Author:            ReCorp
    88 * Author URI:        https://www.upwork.com/fl/rayhan1
     
    2020    load_plugin_textdomain('wp-to-html', false, dirname(plugin_basename(__FILE__)) . '/languages');
    2121});
    22 define('WP_TO_HTML_VERSION', '6.0.3');
     22define('WP_TO_HTML_VERSION', '6.0.4');
    2323define('WP_TO_HTML_PATH', plugin_dir_path(__FILE__));
    2424define('WP_TO_HTML_URL', plugin_dir_url(__FILE__));
     
    157157 */
    158158add_action('admin_init', function () {
    159     // Only run for admins.
    160159    if (!current_user_can('manage_options')) return;
    161 
    162     // Skip during AJAX, cron, bulk activate, or CLI.
    163160    if (wp_doing_ajax() || wp_doing_cron()) return;
    164161    if (isset($_GET['activate-multi'])) return;
     
    167164    $stored = get_option('wp_to_html_version', '');
    168165
     166    // First install — store version, no redirect.
    169167    if ($stored === '') {
    170         // First install — store version, no redirect.
    171168        update_option('wp_to_html_version', WP_TO_HTML_VERSION, false);
    172169        return;
    173170    }
    174171
    175     if (version_compare($stored, WP_TO_HTML_VERSION, '<')) {
    176         // Plugin was updated — set transient and bump stored version.
    177         update_option('wp_to_html_version', WP_TO_HTML_VERSION, false);
    178         set_transient('wp_to_html_show_whats_new', 1, 60);
    179     }
    180 }, 1);
    181 
    182 add_action('admin_init', function () {
    183     if (!get_transient('wp_to_html_show_whats_new')) return;
    184     delete_transient('wp_to_html_show_whats_new');
     172    // Not an update — nothing to do.
     173    if (!version_compare($stored, WP_TO_HTML_VERSION, '<')) return;
     174
     175    // Plugin was updated — bump stored version first to prevent loop.
     176    update_option('wp_to_html_version', WP_TO_HTML_VERSION, false);
    185177
    186178    // Don't redirect if already on the page.
     
    189181    wp_safe_redirect(admin_url('admin.php?page=wp-to-html-whats-new'));
    190182    exit;
    191 }, 99);
     183});
    192184
    193185register_deactivation_hook(__FILE__, function() {
  • export-wp-page-to-static-html/trunk/includes/class-admin.php

    r3474640 r3474688  
    12641264                    <div class="wth-version">
    12651265                        <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"/><line x1="16" y1="8" x2="2" y2="22"/><line x1="17.5" y1="15" x2="9" y2="15"/></svg>
    1266                         <?php esc_html_e('Version', 'wp-to-html'); ?> <strong>6.0.0</strong>
     1266                        <?php esc_html_e('Version', 'wp-to-html'); ?> <strong>6.0.3</strong>
    12671267                    </div>
    12681268                </div>
Note: See TracChangeset for help on using the changeset viewer.