WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress Group Email Subscription
add apply_filter to $item->content (5 posts)

  1. sboisvert
    Member
    Posted 2 years ago #

    Good day,

    If I may suggest a small change to the code. in line 334 of bp-activity-subscription-digest.php
    changing this:

    $item_message .= "<br><span {$ass_email_css['item_content']}>" . ass_digest_filter( $item->content) . "</span>";

    to:

    $item_message .= "<br><span {$ass_email_css['item_content']}>" .  apply_filter('digest_item_content',$item->content ) . "</span>";

    and then removing

    // standard wp filters to clean up things that might mess up email display - (maybe not necessary?)
    function ass_digest_filter( $item ) {
    	$item = wptexturize( $item );
    	$item = convert_chars( $item );
    	return $item;
    }

    and replacing it with:

    // standard wp filters to clean up things that might mess up email display - (maybe not necessary?)
    add_filter('digest_item_content','wptexturize');
    add_filter('digest_item_content','convert_chars');

    personally I've had to add

    add_filter('digest_item_content','stripslashes');

    Not sure if this is something others had to do as well.
    This allows to add other filters such as to limit the size of the activity posts length.

    Thanks

    http://wordpress.org/extend/plugins/buddypress-group-email-subscription/

  2. sboisvert
    Member
    Posted 2 years ago #

    Just to add to this. I left the ass_digest_filter() function in place since its being used elsewhere in the code for other things.

  3. nickharambee
    Member
    Posted 2 years ago #

    Hi sboisvert. Thanks for your post. It helped me to get rid of the backslashes in my digest emails.

    I am wondering about what you are hoping to do with the other changes you suggest? It sounds like you are able to set the length of updates posted in activity streams? At the moment these are cut off after a set number of characters, and I would rather all of the update showed in the digest. Can you let me know what the changes you have made actually do? Thanks.

    Also, I can see that comments on/replies to updates aren't included in digests, and I would like them to be. Do you know how to achieve this?

    Thanks,

    Nick

  4. Matt
    Member
    Posted 1 year ago #

    Hi @sboisvert - any chance you might be able to look at the thread below? The admin notification emails suffer from the same problem with backslashes.

    http://wordpress.org/support/topic/plugin-buddypress-group-email-subscription-emails-not-parsing-quotes-and-apostrophes?replies=7

  5. MatthewByrom
    Member
    Posted 1 year ago #

    Sorry to resurrect a possibly old thread, but I was wondering if anyone has had any success in adding comments/replies into digests?

    It appears both @nickharambee and I appear to want the same functionality.

    If anyone has any solution to this I'd be most grateful.

    Matthew.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.