Last active
February 28, 2022 16:32
-
-
Save KaineLabs/1bf66a3673780ed6e4160844aad663f8 to your computer and use it in GitHub Desktop.
Youzify - BuddyPress Enable commenting on new blog post
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
<?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