Opened 11 years ago
Last modified 6 years ago
#28352 assigned enhancement
New filters in wp-activate.php
Reported by: | UmeshSingla | Owned by: | voldemortensen |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Login and Registration | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description
Added two new filters to filter content being displayed on activation confirmation or error.
signup_activation_success
and signup_activation_error
, it allows to change the default activation message being displayed
Attachments (5)
Change History (20)
#3
@
10 years ago
- Milestone changed from Awaiting Review to Future Release
- Version changed from trunk to 3.0
#6
@
9 years ago
- Keywords has-patch added; needs-refresh removed
- Milestone changed from Future Release to 4.6
This ticket was mentioned in Slack in #core by voldemortensen. View the logs.
9 years ago
#8
@
9 years ago
A couple questions about the patch:
- Is there a way it can be restructured so we're not passing so much markup to the filters? The answer here may well be "no", but it would be nice to minimize it, since it makes the filter very difficult to use for any purpose but completely rebuilding the message.
- The two different kinds of string being filtered through 'signup_activation_error' are not similar at all. Only the second one seems like an error at all. Given the multiple different ways these messages can be built, I would lean toward having a single 'signup_activation_message' filter that everything gets passed through; callbacks can determine whether it's an "error" by looking at the
$result
parameter.
This ticket was mentioned in Slack in #core by chriscct7. View the logs.
9 years ago
This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.
9 years ago
#12
@
9 years ago
An alternative approach would be short-circuiting the process of generating messages with a pre_signup_activation_error
and pre_signup_activation_success
. These could be passed a false
(plus the other parameters) and if it returns anything other than that, do not continue.
Or we could be more specific and say if the filter returns a string, it is assumed to be a replacement message that we then print out before stopping.
#14
@
9 years ago
- Keywords needs-refresh removed
28352.4.diff is a new take on this ticket, aiming to simplify the process a bit.
- the code to print the success-/error-related output has been moved to separate functions
signup_activation_error()
andsignup_activation_process()
- the filter
pre_signup_activation_error
can be used to short-circuit the process of generating the error output - the filter
pre_signup_activation_success
can be used to short-circuit the process of generating the success output - only
$result
is passed to those filters
Added filters to display a custom user or blog activation message