From 6c98f491fa3310cb3476765750e091db0b619668 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sun, 7 Dec 2008 03:53:28 +0000 Subject: [PATCH] Make wp_user_settings() options global again. Clarify flag on get_user_option(). git-svn-id: https://develop.svn.wordpress.org/trunk@10095 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 4 ++-- wp-includes/user.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index c5c63ee1c8..34f4c0a872 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -688,8 +688,8 @@ function wp_user_settings() { $saved = isset( $_COOKIE['wp-settings-time-' . $user->ID]) ? preg_replace( '/[^0-9]/', '', $_COOKIE['wp-settings-time-' . $user->ID] ) : 0; if ( $saved > $last_time ) { - update_user_option( $user->ID, 'user-settings', $cookie, false ); - update_user_option( $user->ID, 'user-settings-time', time() - 5, false ); + update_user_option( $user->ID, 'user-settings', $cookie, true ); + update_user_option( $user->ID, 'user-settings-time', time() - 5, true ); return; } } diff --git a/wp-includes/user.php b/wp-includes/user.php index daae729326..79a7422851 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -168,10 +168,10 @@ function user_pass_ok($user_login, $user_pass) { * * @param string $option User option name. * @param int $user Optional. User ID. - * @param bool $check_global Whether to check for a global option if a per-user option does not exist. Default is true. + * @param bool $check_blog_options Whether to check for an option in the options table if a per-user option does not exist. Default is true. * @return mixed */ -function get_user_option( $option, $user = 0, $check_global = true ) { +function get_user_option( $option, $user = 0, $check_blog_options = true ) { global $wpdb; $option = preg_replace('|[^a-z0-9_]|i', '', $option); @@ -184,7 +184,7 @@ function get_user_option( $option, $user = 0, $check_global = true ) { $result = $user->{$wpdb->prefix . $option}; elseif ( isset( $user->{$option} ) ) // User specific and cross-blog $result = $user->{$option}; - elseif ( $check_global ) // Blog global + elseif ( $check_blog_options ) // Blog global $result = get_option( $option ); else $result = false;