Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#48334 closed enhancement (fixed)

Allow the remind interval for the admin email verification to be filtered

Reported by: desrosj's profile desrosj Owned by: whyisjake's profile whyisjake
Milestone: 5.3.1 Priority: normal
Severity: normal Version: 5.3
Component: Site Health Keywords: has-patch commit
Focuses: ui, administration Cc:

Description

The admin email verification screen's display interval can be filtered using admin_email_check_interval, but the remind me later interval is hard coded at 3 days.

It would be great to allow this to be filtered. This could also be used to disable the Remind me later link by returning a "falsey" value (similar to how admin_email_check_interval works). A use case I can think of is a site that only wants to allow the admins to "snooze" the page X number of times before having to actually confirm the email.

Attachments (1)

48334.diff (2.3 KB) - added by desrosj 5 years ago.
Add filter for remind interval and hide the Remind me later link if a falsey value is returned.

Download all attachments as: .zip

Change History (8)

@desrosj
5 years ago

Add filter for remind interval and hide the Remind me later link if a falsey value is returned.

#1 @desrosj
5 years ago

  • Type changed from defect (bug) to enhancement

#2 @Clorith
5 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 5.3.1

This looks good, and I'd like to see it come in alongside #48333 for consistency, so I'm marking this for 5.3.1 along with it.

#3 @whyisjake
5 years ago

  • Owner set to whyisjake
  • Status changed from new to assigned

#4 @birgire
5 years ago

In the filter's description of the admin_email_check_interval we have the 0 case (falsey) explained:

   /**
     * Filters the interval for redirecting the user to the admin email confirmation screen.
     * If `0` (zero) is returned, the user will not be redirected.
     *
     * @since 5.3.0
     *
     * @param int Interval time (in seconds).
     */

I suggest we also explain the zero (falsey) case for the admin_email_remind_interval filter.

Eg. change from:

/**
 * Filters the interval for dismissing the admin email confirmation screen.
 *
 * @since 5.3.0
 *
 * @param int Interval time (in seconds). Default is 3 days.
 */
 $remind_interval = (int) apply_filters( 'admin_email_remind_interval', 3 * DAY_IN_SECONDS );


to

/**
 * Filters the interval for dismissing the admin email confirmation screen.
 * If `0` (zero) is returned, the "Remind me later" link will not be displayed.
 *
 * @since 5.3.1
 *
 * @param int Interval time (in seconds). Default is 3 days.
 */
 $remind_interval = (int) apply_filters( 'admin_email_remind_interval', 3 * DAY_IN_SECONDS );


or something similar about the reminder functionality being disabled.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


5 years ago

#6 @SergeyBiryukov
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 46838:

Users: Introduce admin_email_remind_interval filter for dismissing the admin email confirmation screen.

Props desrosj, birgire.
Fixes #48334.

#7 @SergeyBiryukov
5 years ago

In 46839:

Users: Introduce admin_email_remind_interval filter for dismissing the admin email confirmation screen.

Props desrosj, birgire.
Merges [46838], [46837] to the 5.3 branch.
Fixes #48334.

Note: See TracTickets for help on using tickets.