bp_email_plaintext_entity_decode( string $retval, string $prop, string $transform )

Decode HTML entities for plain-text emails.


Description Description


Parameters Parameters

$retval

(Required) Current email content.

$prop

(Required) Email property to check against.

$transform

(Required) Either 'raw' or 'replace-tokens'.


Top ↑

Return Return

(string|null) $retval Modified email content.


Top ↑

Source 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;
	}
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.