Make WordPress Core


Ignore:
Timestamp:
06/08/2006 06:36:05 PM (18 years ago)
Author:
ryan
Message:

User management improvements from Mark Jaquith and David House. #2793

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-functions.php

    r3850 r3857  
    730730        $short_url =  substr($short_url, 0, 32).'...';
    731731    $numposts = get_usernumposts($user_object->ID);
    732     if (0 < $numposts) $numposts = "<a href='edit.php?author=$user_object->ID' title='" . __('View posts') . "'>$numposts</a>";
    733732    $r = "<tr id='user-$user_object->ID'$style>
    734733        <td><input type='checkbox' name='users[]' id='user_{$user_object->ID}' value='{$user_object->ID}' /> <label for='user_{$user_object->ID}'>{$user_object->ID}</label></td>
     
    737736        <td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td>
    738737        <td><a href='$url' title='website: $url'>$short_url</a></td>";
    739     $r .= "\n\t\t<td align='center'>$numposts</td>";
    740     $r .= "\n\t\t<td>";
     738    $r .= "\n\t\t<td align='center'>";
     739    if ($numposts > 0) {
     740        $r .= "<a href='edit.php?author=$user_object->ID' title='" . __('View posts by this author') . "' class='edit'>";
     741        $r .= sprintf(__('View %1$s %2$s'), $numposts, __ngettext('post', 'posts', $numposts));
     742    }
     743    $r .= "</td>\n\t\t<td>";
     744    $edit_link = add_query_arg('wp_http_referer', wp_specialchars(urlencode(stripslashes($_SERVER['REQUEST_URI']))), "user-edit.php?user_id=$user_object->ID");
    741745    if ( current_user_can('edit_user', $user_object->ID) )
    742         $r .= "<a href='user-edit.php?user_id=$user_object->ID' class='edit'>".__('Edit')."</a>";
     746        $r .= "<a href='$edit_link' class='edit'>".__('Edit')."</a>";
    743747    $r .= "</td>\n\t</tr>";
    744748    return $r;
Note: See TracChangeset for help on using the changeset viewer.