Tagged: mediapress comments
quite often when someone adds an image to a gallery we get many short comments added which all then appear in the activity feed. Is there a way to stop the comments being added to the feed?
Hi Geoff,
Thank you for the question.Please visit Dashboard->MediaPress->Settings->BuddyPress and disable the section for automatically adding to activity.
Regards
BrajeshHi Brajesh,
Thanks for your reply.I see it’s possible stop new media posts being added to the activity feed.
I’m happy with that but just want to stop the comments being added to the activity feed. There doesn’t seem to be a setting to disable that.
Regards,
GeoffHi Geoff,
Thank you for the reply and the clarification.The media/gallery comments are internally activity comment/reply. Do you want to disable users from commenting the gallery/media? Otherwise, We can exclude it from main activity stream(by type) and still keep the commenting functionality.
Regards
BrajeshHi Brajesh,
Thanks for your reply.
Yes, we want to keep the commenting functionality but exclude the comments from the main activity stream.
When someone posts a picture it can be tedious when 10 people comment “Nice pic!” lol.
Regards,
GeoffHi Geoff,
Thank you for your patience.Please put this code in bp-custom.php
/** * Filters out media comment from activity stream. */ add_filter( 'bp_after_has_activities_parse_args', function ( $args ) { if ( isset( $_REQUEST['action'] ) && 'mpp_fetch_activity_media' == $_REQUEST['action'] ) { return $args; } if ( function_exists( 'mpp_is_single_media' ) && mpp_is_single_media() ) { return $args; } $filters = isset ( $args['meta_query'] ) ? (array) $args['meta_query'] : array(); $filters[] = array( 'key' => '_mpp_activity_type', 'compare' => '!=', 'value' => 'media_comment' ); $args['meta_query'] = $filters; return $args; } );It should resolve the issue. Please let me know if it works or not?
Thank you
BrajeshThanks, works well, much appreciated.
Regards,
GeoffHi Geoff,
Thank you for confirming.I am glad it worked.
Regards
Brajesh
The topic ‘ [Resolved] How to prevent media comments being added to the activity feed’ is closed to new replies.