Make WordPress Core

Opened 11 years ago

Last modified 7 years ago

#35858 new enhancement

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

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

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 11 years ago.
35858.diff​ (1.2 KB ) - added by johnbillion 11 years ago.

Download all attachments as: .zip

Change History (6)

#1 @boonebgorges
11 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.

#2 @johnbillion
11 years ago

  • Component Administration → Login and Registration
  • Keywords has-patch 2nd-opinion added
  • Type defect (bug) → enhancement
  • Version 4.4.2 → 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
11 years ago

  • Focuses multisite added

#4 @boonebgorges
10 years ago

  • Keywords 2nd-opinion removed
  • Milestone Awaiting Review → 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.