Created
February 2, 2014 03:47
-
-
Save dwenaus/8762785 to your computer and use it in GitHub Desktop.
code to add to functions.php so that BuddyPress Group Email Subscription plugin plays nicely with WP Better Emails plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// if the WP_Better_Emails plugin is installed, stop BuddyPress Group Email Subscription plugin from wrapping digests with <html><body>$message</body></html> | |
function my_dont_wrap_digests_with_html_twice( $message, $message_pre_html_wrap ) { | |
if ( class_exists( 'WP_Better_Emails' ) ) { | |
$message = $message_pre_html_wrap; | |
} | |
return $message; | |
} | |
add_filter( 'ass_digest_message_html', 'my_dont_wrap_digests_with_html_twice', 10, 2 ); |
hmmm i've placed the code in my bp-custom.php but it doesn't change anything. Thanks Dwenaus but i'll have to try something else!
Here's a wordpress forum topic about it on the WP Better Emails Plugin support : https://wordpress.org/support/topic/also-customize-the-emails-of-buddypress
Hi, i have found a sort of work out to disable html formating for Wp Better Email Digest, please help me to write the function !
boonebgorges/buddypress-group-email-subscription#65
Is this function correct? (i've placed it in my bp-custom.php file)
function my_digests_in_plain_text( $headers ) {
if ( class_exists( 'WP_Better_Emails' ) ) {
$headers = array( 'Content-type: text/plain' );
}
return $headers;
}
add_filter( 'ass_send_multipart_email', 'my_digests_in_plain_text', 10, 2 );
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i've really tried to disabled the html formating for digest mail but it didn't work, even if i comment this line:
$message = apply_filters( 'ass_digest_message_html', "{$message}", $message );
i still get the html formating which doesn't work with the WP_Better_Email plugin... please help!