Ticket #1202: bug1202.patch
File bug1202.patch, 1.3 KB (added by , 19 years ago) |
---|
-
template-functions-general.php
old new 25 25 26 26 27 27 function wp_loginout() { 28 global $user_ level;28 global $user_ID; 29 29 get_currentuserinfo(); 30 30 31 if ( 0 == $user_level) :31 if ($user_ID == "") : 32 32 $link = '<a href="' . get_settings('siteurl') . '/wp-login.php">' . __('Login') . '</a>'; 33 33 else : 34 34 $link = '<a href="' . get_settings('siteurl') . '/wp-login.php?action=logout">' . __('Logout') . '</a>'; … … 38 38 } 39 39 40 40 function wp_register( $before = '<li>', $after = '</li>' ) { 41 global $user_ level;41 global $user_ID; 42 42 43 43 get_currentuserinfo(); 44 44 45 if ( 0 == $user_level&& get_settings('users_can_register') ) :45 if ($user_ID == "" && get_settings('users_can_register') ) : 46 46 $link = $before . '<a href="' . get_settings('siteurl') . '/wp-register.php">' . __('Register') . '</a>' . $after; 47 elseif ( 0 == $user_level&& !get_settings('users_can_register') ) :47 elseif ($user_ID == "" && !get_settings('users_can_register') ) : 48 48 $link = ''; 49 49 else : 50 50 $link = $before . '<a href="' . get_settings('siteurl') . '/wp-admin/">' . __('Site Admin') . '</a>' . $after;