Skip to:
Content

BuddyPress.org

Opened 4 years ago

Closed 4 years ago

#8173 closed enhancement (fixed)

Hook to filter list of e-mails

Reported by: espellcaste's profile espellcaste Owned by: espellcaste's profile espellcaste
Milestone: 7.0.0 Priority: normal
Severity: normal Version:
Component: Emails Keywords: good-first-bug has-patch commit
Cc:

Description

Suggestion: Allow devs to hook into the bp_email_get_schema so that they can add or remove emails.

One can add emails via the bp_core_install_emails hook, but it is not that easy to remove it. Forcing the developer to come up with creative ways to accomplish this task.

Also, a lot of code is duplicated in the bp_core_install_emails function to create new emails. So the hook on the schema function would avoid this code duplication.

Attachments (1)

8173.diff (1.8 KB) - added by espellcaste 4 years ago.

Download all attachments as: .zip

Change History (11)

#1 @espellcaste
4 years ago

  • Keywords good-first-bug added
  • Version set to 5.0.0

This ticket was mentioned in Slack in #buddypress by espellcaste. View the logs.


4 years ago

#3 @espellcaste
4 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 7.0.0
  • Version 5.0.0 deleted

#4 @espellcaste
4 years ago

  • Owner changed from DJPaul to espellcaste
  • Status changed from new to accepted

#5 @espellcaste
4 years ago

I'm claiming this one!

#6 @espellcaste
4 years ago

  • Status changed from accepted to assigned

#7 @imath
4 years ago

  • Keywords needs-unit-tests added

I believe we should add unit tests to make sure we don't break anything ;)

@espellcaste
4 years ago

#8 @espellcaste
4 years ago

  • Keywords has-patch added; needs-patch needs-unit-tests removed

It is unlikely this hook will break something. It is just to make easier for adding custom emails.

#9 @imath
4 years ago

  • Keywords commit added

Ok, looks good 👌

#10 @espellcaste
4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 12691:

On bp_email_get_schema, we are adding a bp_email_get_schema hook to facilitate the addition and removal of BuddyPress emails.

Props imath

Fixes #8173

Note: See TracTickets for help on using tickets.