Skip to:
Content

BuddyPress.org

Opened 11 months ago

Closed 3 months ago

#8173 closed enhancement (fixed)

Hook to filter list of e-mails

Reported by: espellcaste Owned by: 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 3 months ago.

Download all attachments as: .zip

Change History (11)

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


11 months ago

#3 @espellcaste
5 months ago

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

#4 @espellcaste
5 months ago

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

#5 @espellcaste
5 months ago

I'm claiming this one!

#6 @espellcaste
5 months ago

  • Status changed from accepted to assigned

#7 @imath
4 months ago

  • Keywords needs-unit-tests added

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

@espellcaste
3 months ago

#8 @espellcaste
3 months 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
3 months ago

  • Keywords commit added

Ok, looks good 👌

#10 @espellcaste
3 months 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.