Cybersweden

How to: Adjust the password session time for a protected page in WordPress

by on Jan.22, 2012, under How to

In the wp-pass.php file we look for the following line of code:

setcookie(‘wp-postpass_’ . COOKIEHASH, stripslashes( $_POST[‘post_password’] ), time() + 864000, COOKIEPATH);

The 86400 is the number of seconds that the password session will be alive.

If you only want the cookie to be active for let’s say 30 minutes, just simply change 864000 to 1800.

VN:F [1.9.22_1171]
Rating: 5.0/5 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)
How to: Adjust the password session time for a protected page in WordPress, 5.0 out of 5 based on 3 ratings
  • Facebook
  • Twitter
  • Google
  • Google Reader
  • Live
  • LinkedIn
  • Technorati
  • Blogger
  • Delicious
  • Digg
  • Add to favorites
  • Email
  • Print
  • RSS

3 Comments for this entry

  • CurtisDuts

    vvseqyr

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • CurtisDuts

    advzapn

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • CurtisDuts

    fvkicxm

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!