Changeset 46838
- Timestamp:
- 12/09/2019 01:24:20 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-login.php
r46837 r46838 582 582 } 583 583 584 /** 585 * Filters the interval for dismissing the admin email confirmation screen. 586 * 587 * If `0` (zero) is returned, the "Remind me later" link will not be displayed. 588 * 589 * @since 5.3.1 590 * 591 * @param int $interval Interval time (in seconds). Default is 3 days. 592 */ 593 $remind_interval = (int) apply_filters( 'admin_email_remind_interval', 3 * DAY_IN_SECONDS ); 594 584 595 if ( ! empty( $_GET['remind_me_later'] ) ) { 585 596 if ( ! wp_verify_nonce( $_GET['remind_me_later'], 'remind_me_later_nonce' ) ) { … … 588 599 } 589 600 590 // "Remind me later" is a bit ambiguous. Three days later? 591 update_option( 'admin_email_lifespan', time() + 3 * DAY_IN_SECONDS ); 601 if ( $remind_interval > 0 ) { 602 update_option( 'admin_email_lifespan', time() + $remind_interval ); 603 } 592 604 593 605 wp_safe_redirect( $redirect_to ); … … 696 708 <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' ); ?>" /> 697 709 </div> 698 <div class="admin-email__actions-secondary"> 699 <?php 700 701 $remind_me_link = wp_login_url( $redirect_to ); 702 $remind_me_link = add_query_arg( 703 array( 704 'action' => 'confirm_admin_email', 705 'remind_me_later' => wp_create_nonce( 'remind_me_later_nonce' ), 706 ), 707 $remind_me_link 708 ); 709 710 ?> 711 <a href="<?php echo esc_url( $remind_me_link ); ?>"><?php _e( 'Remind me later' ); ?></a> 712 </div> 710 <?php if ( $remind_interval > 0 ) : ?> 711 <div class="admin-email__actions-secondary"> 712 <?php 713 714 $remind_me_link = wp_login_url( $redirect_to ); 715 $remind_me_link = add_query_arg( 716 array( 717 'action' => 'confirm_admin_email', 718 'remind_me_later' => wp_create_nonce( 'remind_me_later_nonce' ), 719 ), 720 $remind_me_link 721 ); 722 723 ?> 724 <a href="<?php echo esc_url( $remind_me_link ); ?>"><?php _e( 'Remind me later' ); ?></a> 725 </div> 726 <?php endif; ?> 713 727 </div> 714 728 </form>
Note: See TracChangeset
for help on using the changeset viewer.