Changeset 3349922
- Timestamp:
- 08/25/2025 07:33:28 PM (4 months ago)
- Location:
- db-reset-pro/trunk
- Files:
-
- 2 edited
-
db-reset-pro.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
db-reset-pro/trunk/db-reset-pro.php
r3349913 r3349922 5 5 * 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 6 6 * Author: Duplicator 7 * Version: 1.0. 17 * Version: 1.0.2 8 8 * Author URI: https://duplicator.com?utm_source=db-reset-pro&utm_medium=plugin-header&utm_campaign=author-link 9 9 * Text Domain: db-reset-pro … … 25 25 26 26 // Define constants. 27 define( 'DUP_DB_RESET_PRO_VERSION', '1.0. 1' );27 define( 'DUP_DB_RESET_PRO_VERSION', '1.0.2' ); 28 28 define( 'DUP_DB_RESET_PRO_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 29 29 define( 'DUP_DB_RESET_PRO_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); … … 237 237 $blog_public = get_option( 'blog_public' ); 238 238 $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 ); 239 245 240 246 // Determine which user to restore. … … 377 383 wp_set_auth_cookie( $user_id ); 378 384 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 } 382 398 383 399 // Redirect to admin with reset notice and nonce. -
db-reset-pro/trunk/readme.txt
r3349913 r3349922 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable tag: 1.0. 18 Stable tag: 1.0.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 326 326 == Changelog == 327 327 328 = 1.0.2 = 329 * Fixed option persistence across resets 330 * Improved notification system reliability 331 328 332 = 1.0.1 = 329 333 * Plugin reactivates without constant
Note: See TracChangeset
for help on using the changeset viewer.