Opened 18 months ago
Closed 17 months ago
#9169 closed defect (bug) (fixed)
Correct behavior of bp_email_set_content_type filter.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 14.0.0 | Priority: | normal |
| Severity: | normal | Version: | 12.5.0 |
| Component: | Emails | Keywords: | has-patch commit |
| Cc: |
Description
Attempting to change the email type for all emails (from the default html type to plaintext) via the bp_email_set_content_type filter is not working. If an email is created, and the method set_content_type() is not run, the filter will not be invoked.
Reported by @vapvarun.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
This patch sets the email type explicitly when the
BP_Emailis constructed. This ensures that the filter is run. It is possible to still set the type after instantiation using theset_content_type()method.I've added several tests to ensure that the various combinations work.