From 4fc7767424359ec4bdc1ee7e78f3ddee52268ade Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 13 Jun 2017 08:39:42 -0400 Subject: [PATCH] Adding 20 minute timeout for the protected pages. This is for the Welcome Partners section. --- functions.php | 11 ++++++++++- style.css | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index cc80c47..b7bd50d 100644 --- a/functions.php +++ b/functions.php @@ -357,6 +357,15 @@ function tracking_pixels(){ ID == 4727 ) { + if ( isset( $_COOKIE['wp-postpass_' . COOKIEHASH] )) { + // Setting a time of 0 in setcookie() forces the cookie to expire with the session + setcookie('wp-postpass_' . COOKIEHASH, $_COOKIE['wp-postpass_' . COOKIEHASH], strtotime( '+20 minutes' ), COOKIEPATH); + } + } +} ?> diff --git a/style.css b/style.css index 54f86e6..6c9a152 100644 --- a/style.css +++ b/style.css @@ -3,5 +3,5 @@ Theme Name: Capstone Author: Gaslight Media Author URI: http://www.gaslightmedia.com Description: A theme for Capstone -Version: 1.0.21 +Version: 1.0.22 */ -- 2.17.1