Last active
September 27, 2016 16:23
-
-
Save jpmarchand/2b3dffadd9a67dd3270d to your computer and use it in GitHub Desktop.
Make private posts visible to subscribers. Source: http://www.billerickson.net/code/private-posts-visible-to-subscribers/
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 | |
//* Make private posts visible to subscribers | |
function customprefix_private_posts_subscribers() { | |
$subRole = get_role( 'subscriber' ); | |
$subRole->add_cap( 'read_private_posts' ); | |
} | |
add_action( 'init', 'customprefix_private_posts_subscribers' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment