From 7eb704b71bcc768b7311c23778d6c363f8c55304 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 23 Jan 2008 18:20:59 +0000 Subject: [PATCH] Pass remember arg. see #5405 git-svn-id: http://svn.automattic.com/wordpress/trunk@6644 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 5 +++++ wp-includes/user.php | 2 +- wp-includes/widgets.php | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index fae84ce818..321ee22c8d 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -25,6 +25,11 @@ function &query_posts($query) { function wp_reset_query() { unset($GLOBALS['wp_query']); $GLOBALS['wp_query'] =& $GLOBALS['wp_the_query']; + global $wp_query; + if ( !empty($wp_query->post) ) { + $GLOBALS['post'] = $wp_query->post; + setup_postdata($wp_query->post); + } } /* diff --git a/wp-includes/user.php b/wp-includes/user.php index 641b0a9379..b0cac11c9b 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -48,7 +48,7 @@ function wp_signon( $credentials = '' ) { if ( is_wp_error($user) ) return $user; - wp_set_auth_cookie($user->ID); + wp_set_auth_cookie($user->ID, $credentials['remember']); do_action('wp_login', $credentials['user_login']); return $user; } diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index c1f6194f94..b34e7e5613 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -874,6 +874,7 @@ function wp_widget_recent_entries($args) {