From 1d6d4c6d93ce6e818fa64319701c8dc68f7643fd Mon Sep 17 00:00:00 2001 From: rboren Date: Tue, 15 Feb 2005 00:17:21 +0000 Subject: [PATCH] Make wp_setcookie() and wp_clearcookie() replaceable. git-svn-id: http://svn.automattic.com/wordpress/trunk@2340 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index c37beeeec3..9e9389aa5e 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1752,6 +1752,7 @@ function add_magic_quotes($array) { return $array; } +if ( !function_exists('wp_setcookie') ) : function wp_setcookie($username, $password, $already_md5 = false, $home = '', $siteurl = '') { if ( !$already_md5 ) $password = md5( md5($password) ); // Double hash the password in the cookie. @@ -1777,12 +1778,14 @@ function wp_setcookie($username, $password, $already_md5 = false, $home = '', $s setcookie('wordpresspass_'. $cookiehash, $password, time() + 31536000, $sitecookiepath); } } +endif; +if ( !function_exists('wp_clearcookie') ) : function wp_clearcookie() { setcookie('wordpressuser_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH); setcookie('wordpresspass_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH); setcookie('wordpressuser_' . COOKIEHASH, ' ', time() - 31536000, SITECOOKIEPATH); setcookie('wordpresspass_' . COOKIEHASH, ' ', time() - 31536000, SITECOOKIEPATH); } - +endif; ?>