Changeset 3298 for trunk/wp-includes/functions.php
- Timestamp:
- 12/13/2005 03:46:08 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r3289 r3298 301 301 } 302 302 303 function get_user_option( $option ) {303 function get_user_option( $option, $user = 0 ) { 304 304 global $wpdb, $current_user; 305 if ( isset( $current_user->{$wpdb->prefix . $option} ) ) // Blog specific 306 return $current_user->{$wpdb->prefix . $option}; 307 elseif ( isset( $current_user->{$option} ) ) // User specific and cross-blog 308 return $current_user->{$option}; 305 306 if ( empty($user) ) 307 $user = $current_user; 308 else 309 $user = get_userdata($user); 310 311 if ( isset( $user->{$wpdb->prefix . $option} ) ) // Blog specific 312 return $user->{$wpdb->prefix . $option}; 313 elseif ( isset( $user->{$option} ) ) // User specific and cross-blog 314 return $user->{$option}; 309 315 else // Blog global 310 316 return get_option( $option );
Note: See TracChangeset
for help on using the changeset viewer.