Plugin Directory

Changeset 3450705


Ignore:
Timestamp:
01/30/2026 08:45:42 PM (3 weeks ago)
Author:
blaminhor
Message:
  1. 1.4.5
Location:
blaminhor-essentials
Files:
98 added
4 edited

Legend:

Unmodified
Added
Removed
  • blaminhor-essentials/trunk/assets/js/modules.js

    r3450526 r3450705  
    14631463        downloadBackupArchives: function(archives) {
    14641464            var self = this;
    1465             var index = 0;
    1466 
    1467             function downloadNext() {
    1468                 if (index >= archives.length) {
    1469                     return;
    1470                 }
    1471                 var filename = archives[index];
    1472                 index++;
     1465            var urls = [];
     1466            var loaded = 0;
     1467
     1468            // Step 1: Fetch all download URLs in parallel.
     1469            $.each(archives, function(i, filename) {
    14731470                $.post(self.ajaxurl, {
    14741471                    action: 'ap_backup_download',
     
    14771474                }, function(response) {
    14781475                    if (response.success) {
    1479                         var $iframe = $('<iframe>', { src: response.data.url }).hide().appendTo('body');
    1480                         setTimeout(function() {
    1481                             $iframe.remove();
    1482                             downloadNext();
    1483                         }, 300);
    1484                     } else {
    1485                         alert(response.data);
     1476                        urls[i] = response.data.url;
     1477                    }
     1478                    loaded++;
     1479                    if (loaded === archives.length) {
     1480                        triggerDownloads();
    14861481                    }
    14871482                });
    1488             }
    1489 
    1490             downloadNext();
     1483            });
     1484
     1485            // Step 2: Trigger downloads sequentially via window.location.href.
     1486            function triggerDownloads() {
     1487                var index = 0;
     1488                function next() {
     1489                    if (index >= urls.length) {
     1490                        return;
     1491                    }
     1492                    if (urls[index]) {
     1493                        window.location.href = urls[index];
     1494                    }
     1495                    index++;
     1496                    if (index < urls.length) {
     1497                        setTimeout(next, 1500);
     1498                    }
     1499                }
     1500                next();
     1501            }
    14911502        },
    14921503
  • blaminhor-essentials/trunk/blaminhor-essentials.php

    r3450526 r3450705  
    44 * Plugin URI:        https://wp.blaminhor.com/
    55 * Description:       A modular toolkit for WordPress with activatable features. Lightweight, secure, and reliable.
    6  * Version:           1.4.4
     6 * Version:           1.4.5
    77 * Requires at least: 6.2
    88 * Requires PHP:      7.4
     
    2323
    2424// Plugin constants
    25 define('BLAMINHOR_ESSENTIALS_VERSION', '1.4.4');
     25define('BLAMINHOR_ESSENTIALS_VERSION', '1.4.5');
    2626define('BLAMINHOR_ESSENTIALS_PLUGIN_FILE', __FILE__);
    2727define('BLAMINHOR_ESSENTIALS_PLUGIN_DIR', plugin_dir_path(__FILE__));
  • blaminhor-essentials/trunk/modules/backup/class-module-backup.php

    r3450526 r3450705  
    19681968                <tbody>
    19691969                    <?php foreach ( $backups as $backup ) : ?>
    1970                         <tr data-prefix="<?php echo esc_attr( $backup['prefix'] ); ?>" data-type="<?php echo esc_attr( $backup['type'] ); ?>" data-size="<?php echo esc_attr( $backup['total_size'] ); ?>" data-date="<?php echo esc_attr( $backup['date'] ); ?>" data-archives="<?php echo esc_attr( wp_json_encode( array_map( 'basename', $backup['archives'] ) ) ); ?>">
     1970                        <tr data-prefix="<?php echo esc_attr( $backup['prefix'] ); ?>" data-type="<?php echo esc_attr( $backup['type'] ); ?>" data-size="<?php echo esc_attr( $backup['total_size'] ); ?>" data-date="<?php echo esc_attr( $backup['date'] ); ?>" data-archives="<?php echo esc_attr( wp_json_encode( wp_list_pluck( $backup['archives'], 'filename' ) ) ); ?>">
    19711971                            <td>
    19721972                                <code style="font-size: 12px;"><?php echo esc_html( $backup['prefix'] ); ?></code>
     
    25152515                            <tbody>
    25162516                                <?php foreach ( $backups as $backup ) : ?>
    2517                                     <tr data-prefix="<?php echo esc_attr( $backup['prefix'] ); ?>" data-type="<?php echo esc_attr( $backup['type'] ); ?>" data-size="<?php echo esc_attr( $backup['total_size'] ); ?>" data-date="<?php echo esc_attr( $backup['date'] ); ?>" data-archives="<?php echo esc_attr( wp_json_encode( array_map( 'basename', $backup['archives'] ) ) ); ?>">
     2517                                    <tr data-prefix="<?php echo esc_attr( $backup['prefix'] ); ?>" data-type="<?php echo esc_attr( $backup['type'] ); ?>" data-size="<?php echo esc_attr( $backup['total_size'] ); ?>" data-date="<?php echo esc_attr( $backup['date'] ); ?>" data-archives="<?php echo esc_attr( wp_json_encode( wp_list_pluck( $backup['archives'], 'filename' ) ) ); ?>">
    25182518                                        <td style="text-align: center;"><input type="checkbox" class="ap-backup-checkbox" value="<?php echo esc_attr( $backup['prefix'] ); ?>"></td>
    25192519                                        <td>
  • blaminhor-essentials/trunk/readme.txt

    r3450526 r3450705  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.4.4
     7Stable tag: 1.4.5
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    203203
    204204== Changelog ==
     205
     206= 1.4.5 =
     207* Fixed: Backup module - Download button now works correctly on all server configurations (PHP 8+ fatal error fix).
     208* Fixed: Backup module - Multi-archive backups now download all files instead of only the first one.
    205209
    206210= 1.4.4 =
     
    322326== Upgrade Notice ==
    323327
     328= 1.4.5 =
     329Fixed Download button crash on PHP 8+ and multi-archive download support.
     330
    324331= 1.4.4 =
    325332Backup module now includes a Download button to save backup archives directly to your computer.
Note: See TracChangeset for help on using the changeset viewer.