Make WordPress Core

Opened 9 years ago

Last modified 5 years ago

#35858 new enhancement

"wpmu_welcome_notification" has a filter post-processing routines in wrong place

Reported by: mwillberg's profile mwillberg Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Login and Registration Keywords: has-patch
Focuses: multisite Cc:

Description

"wpmu_welcome_notification" has a filter post-processing routines in wrong place which renders the filter mostly useless. Nearly identical "wpmu_welcome_user_notification" has it done corectly.

Diff/Patch attached.

Attachments (2)

welcome.diff.txt (1.8 KB) - added by mwillberg 9 years ago.
35858.diff (1.2 KB) - added by johnbillion 9 years ago.

Download all attachments as: .zip

Change History (6)

#1 @boonebgorges
9 years ago

I don't know about "useless", but the placement of the filter definitely makes it harder to use.

I don't feel very confident about outright moving the filter. Anyone currently using it is probably depending on the string to be pre-processed, and their customizations will break if this behavior is changed. The conservative thing to do is probably to introduce a new filter, which would run on the string before the placeholders have been swapped out.

@johnbillion
9 years ago

#2 @johnbillion
9 years ago

  • Component changed from Administration to Login and Registration
  • Keywords has-patch 2nd-opinion added
  • Type changed from defect (bug) to enhancement
  • Version changed from 4.4.2 to 3.0

35858.diff introduces a new tokenized_update_welcome_email filter which is identical to update_welcome_email except it gets applied to the welcome email contents before tokenized replacement occurs.

#3 @jeremyfelt
9 years ago

  • Focuses multisite added

#4 @boonebgorges
8 years ago

  • Keywords 2nd-opinion removed
  • Milestone changed from Awaiting Review to Future Release

35858.diff seems like a good approach. Personally, I'd call it update_welcome_email_tokenized to make the parallel with update_welcome_email clearer, but I don't feel strongly about it.

Note: See TracTickets for help on using tickets.