bp_email_plaintext_entity_decode( string $retval, string $prop, string $transform )
Decode HTML entities for plain-text emails.
Description
Parameters
- $retval
-
(Required) Current email content.
- $prop
-
(Required) Email property to check against.
- $transform
-
(Required) Either 'raw' or 'replace-tokens'.
Return
(string|null) $retval Modified email content.
Source
File: bp-core/bp-core-filters.php
function bp_email_plaintext_entity_decode( $retval, $prop, $transform ) { switch ( $prop ) { case 'content_plaintext' : case 'subject' : // Only decode if 'replace-tokens' is the current type. if ( 'replace-tokens' === $transform ) { return html_entity_decode( $retval, ENT_QUOTES ); } else { return $retval; } break; default : return $retval; break; } }
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.