Opened 10 years ago
Closed 7 years ago
#6308 closed enhancement (maybelater)
bp_settings_action_general() could be broken down into smaller functions
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Settings | Keywords: | good-first-bug, trac-tidy-2018 |
Cc: |
Description
Opening this ticket after a discussion at WordCamp London Contributor Day.
Inside bp-settings-actions.php there's a function bp_settings_action_general()
which could be broken down into smaller functions.
Change History (7)
#1
@
10 years ago
- Keywords good-first-bug added
- Milestone changed from Awaiting Review to Future Release
- Type changed from defect (bug) to enhancement
#2
@
9 years ago
I'm looking at this ticket because I have a need to enforce strong passwords across WordPress and BuddyPress and there's no filter available in bp_settings_action_general()
to add additional checks to the password submitted via the Profile Settings form. The structure of the function doesn't seem to lend itself to an effective filter since the feedback message switch
statement would apparently require a second one. Refactoring the function seems to me the logical answer to this.
The question I have is about this ticket is what the preferred approach would be - i.e. would it be preferable to hook new functions to the bp_actions
hook or create subroutines for the existing function?
#3
follow-up:
↓ 4
@
9 years ago
I think new functions hooked, that deal with one aspect. Like most of the rest of the functions in this file, I'd say. What do you think?
#4
in reply to:
↑ 3
@
9 years ago
Replying to DJPaul:
I think new functions hooked, that deal with one aspect.
My hesitation regarding this approach is that:
- feedback would be limited to either email errors or password errors, not both as is currently the case.
- it would be tricky to return the "No changes were made to your account." feedback
wp_update_user()
would be called twice- it's not clear where the
bp_core_general_settings_after_save
hook should live
Other than that, I agree with you :-)
#6
@
7 years ago
- Keywords trac-tidy-2018 added
We're closing this ticket because it has not received any contribution or comments for at least two years. We have decided that it is better to close tickets that are good ideas, which have not gotten (or are unlikely to get) contributions, rather than keep things open indefinitely. This will help us share a more realistic roadmap for BuddyPress with you.
Everyone very much appreciates the time and effort that you spent sharing your idea with us. On behalf of the entire BuddyPress team, thank you.
If you feel strongly that this enhancement should still be added to BuddyPress, and you are able to contribute effort towards it, we encourage you to re-open the ticket, or start a discussion about it in our Slack channel. Please consider that time has proven that good ideas without contributions do not get built.
For more information, see https://bpdevel.wordpress.com/2018/01/21/our-awaiting-contributions-milestone-contains/
or find us on Slack, in the #buddypress channel: https://make.wordpress.org/chat/
Yep. :)
Marking this as good-first-bug because though it's not a trivial task, it'd be a good ticket for a contributor looking for something larger to have a go at.