source: trunk/www.guidonia.net/wp/wp-pass.php@ 44

Last change on this file since 44 was 44, checked in by luciano, 15 years ago
File size: 487 bytes
Line 
1<?php
2/**
3 * Creates the password cookie and redirects back to where the
4 * visitor was before.
5 *
6 * @package WordPress
7 */
8
9/** Make sure that the WordPress bootstrap has run before continuing. */
10require( dirname(__FILE__) . '/wp-load.php');
11
12if ( get_magic_quotes_gpc() )
13 $_POST['post_password'] = stripslashes($_POST['post_password']);
14
15// 10 days
16setcookie('wp-postpass_' . COOKIEHASH, $_POST['post_password'], time() + 864000, COOKIEPATH);
17
18wp_safe_redirect(wp_get_referer());
19?>
Note: See TracBrowser for help on using the repository browser.