Changeset 3771 for branches/2.0/wp-includes/functions.php
- Timestamp:
- 05/11/2006 11:05:45 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/wp-includes/functions.php
r3745 r3771 306 306 307 307 function get_user_option( $option, $user = 0 ) { 308 global $wpdb , $current_user;308 global $wpdb; 309 309 310 310 if ( empty($user) ) 311 $user = $current_user;311 $user = wp_get_current_user(); 312 312 else 313 313 $user = get_userdata($user); … … 1148 1148 } 1149 1149 1150 // Setup global user vars. Used by set_current_user() for back compat. 1151 function setup_userdata($user_id = '') { 1152 global $user_login, $userdata, $user_level, $user_ID, $user_email, $user_url, $user_pass_md5, $user_identity; 1153 1154 if ( '' == $user_id ) 1155 $user = wp_get_current_user(); 1156 else 1157 $user = new WP_User($user_id); 1158 1159 if ( 0 == $user->ID ) 1160 return; 1161 1162 $userdata = $user->data; 1163 $user_login = $user->user_login; 1164 $user_level = $user->user_level; 1165 $user_ID = $user->ID; 1166 $user_email = $user->user_email; 1167 $user_url = $user->user_url; 1168 $user_pass_md5 = md5($user->user_pass); 1169 $user_identity = $user->display_name; 1170 } 1171 1150 1172 function is_new_day() { 1151 1173 global $day, $previousday; … … 2289 2311 } 2290 2312 2313 function wp_nonce_url($actionurl, $action = -1) { 2314 return add_query_arg('_wpnonce', wp_create_nonce($action), $actionurl); 2315 } 2316 2317 function wp_nonce_field($action = -1) { 2318 echo '<input type="hidden" name="_wpnonce" value="' . wp_create_nonce($action) . '" />'; 2319 } 2320 2291 2321 ?>
Note: See TracChangeset
for help on using the changeset viewer.