diff --git a/public-post-preview.php b/public-post-preview.php index 3eebed6..dcb3f45 100644 --- a/public-post-preview.php +++ b/public-post-preview.php @@ -767,7 +767,8 @@ private static function maybe_redirect_to_published_post( $post_id ) { * @return int The time-dependent variable. */ private static function nonce_tick() { - $nonce_life = apply_filters( 'ppp_nonce_life', get_option( 'public_post_preview_expiration_time' ) ?: 48 ); + $expiration = get_option( 'public_post_preview_expiration_time' ) ?: 48; + $nonce_life = apply_filters( 'ppp_nonce_life', $expiration * HOUR_IN_SECONDS ); return ceil( time() / ( $nonce_life / 2 ) ); }