Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#32563 closed enhancement (duplicate)

Introduce filter for disabling new user notifcation

Reported by: jfarthing84's profile jfarthing84 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: Login and Registration Keywords: close
Focuses: Cc:


We should introduce an action within register_new_user as a conditional to make it easy for plugins to disable the default new user notification.

Attachments (2)

32563.patch (508 bytes) - added by jfarthing84 9 years ago.
32563.2.patch (604 bytes) - added by jfarthing84 9 years ago.
Move the filter to wp_new_user_notification.

Download all attachments as: .zip

Change History (12)

9 years ago

#1 @jfarthing84
9 years ago

And by action, I meant filter, of course ;-)

#2 @jfarthing84
9 years ago

  • Keywords has-patch added

#3 @johnbillion
9 years ago

  • Keywords needs-testing added
  • Summary changed from Introduce action for disabling new user notifcation to Introduce filter for disabling new user notifcation

wp_new_user_notification() is called in several places. A filter inside that function may be a better idea.

Last edited 9 years ago by johnbillion (previous) (diff)

#4 @jfarthing84
9 years ago

In that case, the function is pluggable, so I could just override it. However, I've never been a fan of the unpredictability of pluggable functions. As we all know, it's very well possible that another plugin may override it first. So, with that said, here's a patch.

9 years ago

Move the filter to wp_new_user_notification.

#6 @darrenlambert
8 years ago

I get an error when trying to apply the patch

error: pluggable.php: No such file or directory

Seems the file paths in the patch are incorrect?

wp-includes/pluggable.php should be src/wp-includes/pluggable.php

#7 @DrewAPicture
8 years ago

@darrenlambert: When testing patches from core trac, the recommended method is to leverage the patch module for grunt shipped with our build tools in the repo. It can handle the different directories problem. For more on that, see the Testing a Patch page in the Core Contributor Handbook.

If you'd still like to apply the patch directly, I'd suggest moving the the patch file into your src/ directory and applying from there.

#8 @jfarthing84
8 years ago

  • Keywords dev-feedback added; has-patch needs-testing removed

This was actually resolved a different way in [34251].

#9 @jfarthing84
8 years ago

  • Keywords close added; dev-feedback removed

#10 @johnbillion
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #33587.

Note: See TracTickets for help on using tickets.