Changeset 46839 for branches/5.3/src/wp-login.php
- Timestamp:
- 12/09/2019 01:28:13 PM (5 years ago)
- Location:
- branches/5.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.3
- Property svn:mergeinfo changed
/trunk merged: 46837-46838
- Property svn:mergeinfo changed
-
branches/5.3/src/wp-login.php
r46789 r46839 570 570 } 571 571 572 /** 573 * Filters the interval for dismissing the admin email confirmation screen. 574 * 575 * If `0` (zero) is returned, the "Remind me later" link will not be displayed. 576 * 577 * @since 5.3.1 578 * 579 * @param int $interval Interval time (in seconds). Default is 3 days. 580 */ 581 $remind_interval = (int) apply_filters( 'admin_email_remind_interval', 3 * DAY_IN_SECONDS ); 582 572 583 if ( ! empty( $_GET['remind_me_later'] ) ) { 573 584 if ( ! wp_verify_nonce( $_GET['remind_me_later'], 'remind_me_later_nonce' ) ) { … … 576 587 } 577 588 578 // "Remind me later" is a bit ambiguous. Three days later? 579 update_option( 'admin_email_lifespan', time() + 3 * DAY_IN_SECONDS ); 589 if ( $remind_interval > 0 ) { 590 update_option( 'admin_email_lifespan', time() + $remind_interval ); 591 } 580 592 581 593 wp_safe_redirect( $redirect_to ); … … 591 603 /** 592 604 * Filters the interval for redirecting the user to the admin email confirmation screen. 605 * 593 606 * If `0` (zero) is returned, the user will not be redirected. 594 607 * 595 608 * @since 5.3.0 596 609 * 597 * @param int Interval time (in seconds).610 * @param int $interval Interval time (in seconds). Default is 6 months. 598 611 */ 599 612 $admin_email_check_interval = (int) apply_filters( 'admin_email_check_interval', 6 * MONTH_IN_SECONDS ); … … 610 623 611 624 /** 612 * Fires before the admin email confirm form. 613 * 614 * @since 5.3.0 615 * 616 * @param WP_Error $errors A `WP_Error` object containing any errors generated by using invalid credentials. Note that the error object may not contain any errors. 617 */ 625 * Fires before the admin email confirm form. 626 * 627 * @since 5.3.0 628 * 629 * @param WP_Error $errors A `WP_Error` object containing any errors generated by using invalid 630 * credentials. Note that the error object may not contain any errors. 631 */ 618 632 do_action( 'admin_email_confirm', $errors ); 619 633 … … 623 637 <?php 624 638 /** 625 * Fires inside the admin-email-confirm-form form tags, before the hidden fields.626 *627 * @since 5.3.0628 */639 * Fires inside the admin-email-confirm-form form tags, before the hidden fields. 640 * 641 * @since 5.3.0 642 */ 629 643 do_action( 'admin_email_confirm_form' ); 630 644 … … 682 696 <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 697 </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> 698 <?php if ( $remind_interval > 0 ) : ?> 699 <div class="admin-email__actions-secondary"> 700 <?php 701 702 $remind_me_link = wp_login_url( $redirect_to ); 703 $remind_me_link = add_query_arg( 704 array( 705 'action' => 'confirm_admin_email', 706 'remind_me_later' => wp_create_nonce( 'remind_me_later_nonce' ), 707 ), 708 $remind_me_link 709 ); 710 711 ?> 712 <a href="<?php echo esc_url( $remind_me_link ); ?>"><?php _e( 'Remind me later' ); ?></a> 713 </div> 714 <?php endif; ?> 699 715 </div> 700 716 </form>
Note: See TracChangeset
for help on using the changeset viewer.