#12: protected_title_format

The protected_title_format filter allows you to modify the text that gets prepended to a post title if it is password protected. The default is ‘Protected: [Post Title]’.

It is evaluated in get_the_title() in the wp-includes/post-template.php file.


Let’s say you’re using password-protected content in the context of it being “members-only” — that is, only members have the password(s). The following example would change the prepended text from ‘Protected: [Post Title]’ to ‘Members Only: [Post Title]’.

View the code example on Gist.