Forked from greathmaster/pmpro-user-pages-enable-comments.php
Created
May 14, 2020 14:58
-
-
Save MaryOJob/5d66dd8d64c823d777080d7d09cf74e0 to your computer and use it in GitHub Desktop.
Enables comments for User Pages
This file contains hidden or 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
//Enables comments for User Pages | |
function enable_comments_for_user_pages($postdata, $user, $level) | |
{ | |
$postdata['comment_status'] = 'open'; | |
return $postdata; | |
} | |
add_filter('pmpro_user_page_postdata', 'enable_comments_for_user_pages', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment