Forget Post Passwords When the Browser Closes
Makes the cookie that remembers a protected post's password last only until the browser is closed, instead of the default 10 days, which matters on shared and public computers.
Opens WPIDE on
Code
add_filter( 'post_password_expires', '__return_zero' );
Notes
Visitors need to enter the password again in each new browser session.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.