Plugin Directory

Changeset 3349922


Ignore:
Timestamp:
08/25/2025 07:33:28 PM (4 months ago)
Author:
seedprod
Message:

Release 1.0.2

Location:
db-reset-pro/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • db-reset-pro/trunk/db-reset-pro.php

    r3349913 r3349922  
    55 * Description: Safely resets the WordPress database back to defaults. Deletes all customizations and content. Does not modify files, only resets the database. Tools > DB Reset Pro
    66 * Author: Duplicator
    7  * Version: 1.0.1
     7 * Version: 1.0.2
    88 * Author URI: https://duplicator.com?utm_source=db-reset-pro&utm_medium=plugin-header&utm_campaign=author-link
    99 * Text Domain: db-reset-pro
     
    2525
    2626// Define constants.
    27 define( 'DUP_DB_RESET_PRO_VERSION', '1.0.1' );
     27define( 'DUP_DB_RESET_PRO_VERSION', '1.0.2' );
    2828define( 'DUP_DB_RESET_PRO_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    2929define( 'DUP_DB_RESET_PRO_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
     
    237237        $blog_public  = get_option( 'blog_public' );
    238238        $current_user = wp_get_current_user();
     239       
     240        // Save reset count to restore after reset.
     241        $previous_reset_count = get_option( 'dup_db_reset_pro_reset_count', 0 );
     242        $review_status = get_option( 'dup_db_reset_pro_review_status', '' );
     243        $review_snooze_until = get_option( 'dup_db_reset_pro_review_snooze_until', 0 );
     244        $review_snooze_reset_count = get_option( 'dup_db_reset_pro_review_snooze_reset_count', 0 );
    239245
    240246        // Determine which user to restore.
     
    377383            wp_set_auth_cookie( $user_id );
    378384
    379             // Increment reset count for review request.
    380             $reset_count = get_option( 'dup_db_reset_pro_reset_count', 0 );
    381             update_option( 'dup_db_reset_pro_reset_count', $reset_count + 1 );
     385            // Restore and increment reset count for review request.
     386            update_option( 'dup_db_reset_pro_reset_count', $previous_reset_count + 1 );
     387           
     388            // Restore review status if it was set.
     389            if ( ! empty( $review_status ) ) {
     390                update_option( 'dup_db_reset_pro_review_status', $review_status );
     391            }
     392            if ( $review_snooze_until > 0 ) {
     393                update_option( 'dup_db_reset_pro_review_snooze_until', $review_snooze_until );
     394            }
     395            if ( $review_snooze_reset_count > 0 ) {
     396                update_option( 'dup_db_reset_pro_review_snooze_reset_count', $review_snooze_reset_count );
     397            }
    382398
    383399            // Redirect to admin with reset notice and nonce.
  • db-reset-pro/trunk/readme.txt

    r3349913 r3349922  
    66Tested up to: 6.8
    77Requires PHP: 7.4
    8 Stable tag: 1.0.1
     8Stable tag: 1.0.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    326326== Changelog ==
    327327
     328= 1.0.2 =
     329* Fixed option persistence across resets
     330* Improved notification system reliability
     331
    328332= 1.0.1 =
    329333* Plugin reactivates without constant
Note: See TracChangeset for help on using the changeset viewer.