WordPress.org

Support

Support » How-To and Troubleshooting » cookie timout of password protected sites

cookie timout of password protected sites

  • hello everyone,

    today I updated to wordpress 3.5 and now, one of my custom settings misses (I know this could happen – i simply forgot..):

    I customized the cookie timeout for password protected sites according a trick like this: http://originalexe.com/shortening-the-cookie-life-time-for-postpage-password/

    I already figured out, that the file wp-pass.php doesn’t exist anymore and that the changes are made in the wp-login.php. But there it says:

    // 10 days
    setcookie( ‘wp-postpass_’ . COOKIEHASH, $wp_hasher->HashPassword( stripslashes( $_POST[‘post_password’] ) ), time() + 10 * DAY_IN_SECONDS, COOKIEPATH )

    and I don’t know how I have to change the “10 * DAY_IN_SECONDS” thing, before there was just a number of seconds, easily to adjust.

    Sorry, if my problem is quite obvious, I hope someone could help me anyway?

Viewing 1 replies (of 1 total)
  • It’s easy :). It’s a math. It couts 10*86400 (number of second in one day). So if you for example want instead of 10 days just 10 minutes you just must write DAY_IN_SECONDS/144

    Day in seconds is 86400 and if you divide it 144, you’ll got 600 – number of seconds in 10 minutes 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘cookie timout of password protected sites’ is closed to new replies.
Skip to toolbar