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 ); |
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
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