2003-08-20 22:59:20 +00:00
|
|
|
<?php
|
2008-05-25 15:50:15 +00:00
|
|
|
/**
|
|
|
|
* Creates the password cookie and redirects back to where the
|
|
|
|
* visitor was before.
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
*/
|
|
|
|
|
2009-04-20 21:50:29 +00:00
|
|
|
/** Make sure that the WordPress bootstrap has run before continuing. */
|
2008-05-21 05:59:27 +00:00
|
|
|
require( dirname(__FILE__) . '/wp-load.php');
|
2004-10-10 17:46:50 +00:00
|
|
|
|
|
|
|
if ( get_magic_quotes_gpc() )
|
|
|
|
$_POST['post_password'] = stripslashes($_POST['post_password']);
|
|
|
|
|
|
|
|
// 10 days
|
|
|
|
setcookie('wp-postpass_' . COOKIEHASH, $_POST['post_password'], time() + 864000, COOKIEPATH);
|
|
|
|
|
2007-09-18 22:23:16 +00:00
|
|
|
wp_safe_redirect(wp_get_referer());
|
2010-12-09 18:02:54 +00:00
|
|
|
exit;
|
|
|
|
?>
|