BP_Email::set_content_type( string $content_type )
Set the content type (HTML or plain text) to send the email in.
Description
Parameters
- $content_type
-
(Required) Email content type ("html" or "plaintext").
Return
(BP_Email)
Source
File: bp-core/classes/class-bp-email.php
public function set_content_type( $content_type ) {
if ( ! in_array( $content_type, array( 'html', 'plaintext', ), true ) ) {
$class = get_class_vars( get_class() );
$content_type = $class['content_type'];
}
/**
* Filters the new value of the email's "content type" property.
*
* The content type (HTML or plain text) to send the email in.
*
* @since BuddyPress 2.5.0
*
* @param string $content_type Email content type ("html" or "plaintext").
* @param BP_Email $this Current instance of the email type class.
*/
$this->content_type = apply_filters( 'bp_email_set_content_type', $content_type, $this );
return $this;
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 2.5.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.