Ticket #48334: 48334.diff
File 48334.diff, 2.3 KB (added by , 5 years ago) |
---|
-
src/wp-login.php
569 569 exit; 570 570 } 571 571 572 /** 573 * Filters the interval for dismissing the admin email confirmation screen. 574 * 575 * @since 5.3.0 576 * 577 * @param int Interval time (in seconds). Default is 3 days. 578 */ 579 $remind_interval = (int) apply_filters( 'admin_email_remind_interval', 3 * DAY_IN_SECONDS ); 580 572 581 if ( ! empty( $_GET['remind_me_later'] ) ) { 573 582 if ( ! wp_verify_nonce( $_GET['remind_me_later'], 'remind_me_later_nonce' ) ) { 574 583 wp_safe_redirect( wp_login_url() ); 575 584 exit; 576 585 } 577 586 578 // "Remind me later" is a bit ambiguous. Three days later? 579 update_option( 'admin_email_lifespan', time() + 3 * DAY_IN_SECONDS ); 587 if ( $remind_interval > 0 ) { 588 update_option( 'admin_email_lifespan', time() + $remind_interval ); 589 } 580 590 581 591 wp_safe_redirect( $redirect_to ); 582 592 exit; … … 681 691 <a class="button button-large" href="<?php echo esc_url( $change_link ); ?>"><?php _e( 'Update' ); ?></a> 682 692 <input type="submit" name="correct-admin-email" id="correct-admin-email" class="button button-primary button-large" value="<?php esc_attr_e( 'The email is correct' ); ?>" /> 683 693 </div> 684 <div class="admin-email__actions-secondary"> 685 <?php 686 687 $remind_me_link = wp_login_url( $redirect_to ); 688 $remind_me_link = add_query_arg( 689 array( 690 'action' => 'confirm_admin_email', 691 'remind_me_later' => wp_create_nonce( 'remind_me_later_nonce' ), 692 ), 693 $remind_me_link 694 ); 695 696 ?> 697 <a href="<?php echo esc_url( $remind_me_link ); ?>"><?php _e( 'Remind me later' ); ?></a> 698 </div> 694 <?php if ( $remind_interval > 0 ) : ?> 695 <div class="admin-email__actions-secondary"> 696 <?php 697 698 $remind_me_link = wp_login_url( $redirect_to ); 699 $remind_me_link = add_query_arg( 700 array( 701 'action' => 'confirm_admin_email', 702 'remind_me_later' => wp_create_nonce( 'remind_me_later_nonce' ), 703 ), 704 $remind_me_link 705 ); 706 707 ?> 708 <a href="<?php echo esc_url( $remind_me_link ); ?>"><?php _e( 'Remind me later' ); ?></a> 709 </div> 710 <?php endif; ?> 699 711 </div> 700 712 </form> 701 713