I’m looking for a way inside of a loop to tell if a given post or page is protected. Sorry if this was obvious some where in the documentation but i was unable to find it.
Something like the example below is what i’m looking for.
if(is_protected($post->ID)) {
//add some kind of class letting users know the content is protected before they click
}