WordPress.org

Make WordPress Core

Opened 8 months ago

Closed 6 months ago

Last modified 6 months ago

#48334 closed enhancement (fixed)

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

Reported by: desrosj Owned by: 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 8 months 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
8 months ago

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

#1 @desrosj
8 months ago

  • Type changed from defect (bug) to enhancement

#2 @Clorith
6 months 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
6 months ago

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

#4 @birgire
6 months 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.


6 months ago

#6 @SergeyBiryukov
6 months 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
6 months 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.