Post password cookie (wordpress)

Filters the life span of the post password cookie.

<?php
/**
 * Filters the life span of the post password cookie.
 */
add_filter('post_password_expires', function($time) {
    return 0; // session cookie
});
?>

functions.php

< toolbox