Opened 2 years ago
Closed 2 years ago
#9169 closed defect (bug) (fixed)
Correct behavior of bp_email_set_content_type filter.
| Reported by: | dcavins | Owned by: | DJPaul |
|---|---|---|---|
| Priority: | normal | Milestone: | 14.0.0 |
| Component: | Emails | Version: | 12.5.0 |
| Severity: | normal | 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.