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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this function correct? (i've placed it in my bp-custom.php file)