Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Private Posts visible to Subscribers
* Run once
*
*/
function be_private_posts_subscribers() {
$subRole = get_role( 'subscriber' );
$subRole->add_cap( 'read_private_posts' );
}
add_action( 'init', 'be_private_posts_subscribers' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment