Skip to content

Instantly share code, notes, and snippets.

@mrhead
Created June 1, 2016 08:03
Show Gist options
  • Save mrhead/0530392903c6ed39f83cb8c5b7058eaf to your computer and use it in GitHub Desktop.
Save mrhead/0530392903c6ed39f83cb8c5b7058eaf to your computer and use it in GitHub Desktop.
<?php
function is_protected_post( $post_id = NULL ) {
global $post;
if ( $post_id === NULL )
$post_id = $post->ID;
if ( in_array( $post_id, memberful_wp_posts_that_are_protected() ) )
return true;
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment