Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Last active February 28, 2022 16:32
Show Gist options
  • Save KaineLabs/1bf66a3673780ed6e4160844aad663f8 to your computer and use it in GitHub Desktop.
Save KaineLabs/1bf66a3673780ed6e4160844aad663f8 to your computer and use it in GitHub Desktop.
Youzify - BuddyPress Enable commenting on new blog post
<?php
/*
* Enable commenting on new blog post.
*/
function yz_enable_new_blog_posts_commenting( $can_comment, $activity_type ) {
if ( $activity_type == 'new_blog_post' ) {
return true;
}
return $can_comment;
}
add_filter( 'bp_activity_can_comment', 'yz_enable_new_blog_posts_commenting', 99, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment