Make WordPress Core

Changeset 2513


Ignore:
Timestamp:
04/03/2005 05:38:41 PM (20 years ago)
Author:
ryan
Message:

Recognize level 0 users in wp_loginout() and wp_register(). http://mosquito.wordpress.org/view.php?id=1202 Props: MC_incubus

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-general.php

    r2497 r2513  
    2626
    2727function wp_loginout() {
    28     global $user_level;
     28    global $user_ID;
    2929    get_currentuserinfo();
    3030
    31     if (0 == $user_level) :
     31    if ('' == $user_ID) :
    3232        $link = '<a href="' . get_settings('siteurl') . '/wp-login.php">' . __('Login') . '</a>';
    3333    else :
     
    3939
    4040function wp_register( $before = '<li>', $after = '</li>' ) {
    41     global $user_level;
     41    global $user_ID;
    4242
    4343    get_currentuserinfo();
    4444
    45     if (0 == $user_level && get_settings('users_can_register') ) :
     45    if ('' == $user_ID && get_settings('users_can_register') ) :
    4646        $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') ) :
    4848        $link = '';
    4949    else :
Note: See TracChangeset for help on using the changeset viewer.