Changeset 3247922
- Timestamp:
- 02/27/2025 02:31:44 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ideal-wp-login-logo-changer/trunk/ideal-wp-login-logo-changer.php
r3247300 r3247922 373 373 /* Reset the settings */ 374 374 function iwllc_reset_settings() { 375 if( isset( $_GET['action'] ) && 'reset' === $_GET['action'] ){ 376 //In our file that handles the request, verify the nonce. 377 if ( isset( $_REQUEST['_wpnonce'] ) && ! wp_verify_nonce( sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ), 'change_login_logo-settings' ) ) { 378 die( esc_html__( 'Security check', 'ideal-wp-login-logo-changer' ) ); 379 } else { 380 381 delete_option('iwllc_wp_logo_url'); 382 delete_option('iwllc_wp_set_bg'); 383 delete_option('iwllc_wp_bg_color'); 384 delete_option('iwllc_wp_bg_img_url'); 385 delete_option('iwllc_wp_logo_link'); 386 delete_option('iwllc_wp_link_color'); 387 delete_option('iwllc_wp_link_hover_color'); 388 delete_option('iwllc_wp_logo_width'); 389 delete_option('iwllc_wp_logo_height'); 390 wp_safe_redirect( admin_url( 'options-general.php?page=change_login_logo' ) ); 391 exit(); 392 393 } 394 } 395 } 375 if( isset( $_GET['action'] ) && 'reset' === $_GET['action']){ 376 377 if( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_wpnonce'] ) ), 'change_login_logo-settings' ) ){ 378 //In our file that handles the request, verify the nonce. 379 delete_option('iwllc_wp_logo_url'); 380 delete_option('iwllc_wp_set_bg'); 381 delete_option('iwllc_wp_bg_color'); 382 delete_option('iwllc_wp_bg_img_url'); 383 delete_option('iwllc_wp_logo_link'); 384 delete_option('iwllc_wp_link_color'); 385 delete_option('iwllc_wp_link_hover_color'); 386 delete_option('iwllc_wp_logo_width'); 387 delete_option('iwllc_wp_logo_height'); 388 wp_safe_redirect( admin_url( 'options-general.php?page=change_login_logo' ) ); 389 exit(); 390 } 391 else{ 392 die( esc_html__( 'Security check', 'ideal-wp-login-logo-changer' ) ); 393 } 394 } 395 } 396 396 397 add_action( 'iwllc_settings_start', 'iwllc_reset_settings' ); 397 398
Note: See TracChangeset
for help on using the changeset viewer.