Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/04/2016 11:19:21 PM (9 years ago)
Author:
r-a-y
Message:

BP Email: Decode HTML entities for plain-text email content.

See #6592.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-filters.php

    r10499 r10512  
    348348}
    349349add_filter( 'bp_login_redirect', 'bp_core_login_redirect', 10, 3 );
     350
     351/**
     352 * Decode HTML entities for plain-text emails.
     353 *
     354 * @since 2.5.0
     355 *
     356 * @param string $retval Current email content.
     357 * @param string $prop   Email property to check against.
     358 */
     359function bp_email_plaintext_entity_decode( $retval, $prop ) {
     360    if ( 'content_plaintext' !== $prop ) {
     361        return $retval;
     362    }
     363
     364    return html_entity_decode( $retval, ENT_QUOTES );
     365}
     366add_filter( 'bp_email_get_property', 'bp_email_plaintext_entity_decode', 10, 2 );
    350367
    351368/**
Note: See TracChangeset for help on using the changeset viewer.