Changeset 6852
- Timestamp:
- 02/14/2008 08:15:36 PM (17 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r6849 r6852 520 520 $short_url = substr( $short_url, 0, 32 ).'...'; 521 521 $numposts = get_usernumposts( $user_object->ID ); 522 if ( current_user_can( 'edit_user', $user_object->ID ) ) { 523 $edit = add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" ); 524 $edit = "<a href=\"$edit\">$user_object->user_login</a>"; 525 } else { 526 $edit = $user_object->user_login; 527 } 522 528 $r = "<tr id='user-$user_object->ID'$style> 523 529 <td><input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' /></td> 524 <td><label for='user_{$user_object->ID}'>{$user_object->ID}</label></td> 525 <td><label for='user_{$user_object->ID}'><strong>$user_object->user_login</strong></label></td> 526 <td><label for='user_{$user_object->ID}'>$user_object->first_name $user_object->last_name</label></td> 530 <td><strong>$edit</strong></td> 531 <td>$user_object->first_name $user_object->last_name</td> 527 532 <td><a href='mailto:$email' title='" . sprintf( __('e-mail: %s' ), $email ) . "'>$email</a></td> 528 533 <td><a href='$url' title='website: $url'>$short_url</a></td>"; 529 $r .= "\n\t\t<td align='center'>";534 $r .= "\n\t\t<td>"; 530 535 if ( $numposts > 0 ) { 531 536 $r .= "<a href='edit.php?author=$user_object->ID' title='" . __( 'View posts by this author' ) . "' class='edit'>"; 532 $r .= sprintf(__ngettext( 'View %s post', 'View %s posts', $numposts ), $numposts);537 $r .= $numposts; 533 538 $r .= '</a>'; 534 } 535 $r .= "</td>\n\t\t<td>"; 536 if ( current_user_can( 'edit_user', $user_object->ID ) ) { 537 $edit_link = add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" ); 538 $r .= "<a href='$edit_link' class='edit'>".__( 'Edit' )."</a>"; 539 } else { 540 $r .= 0; 539 541 } 540 542 $r .= "</td>\n\t</tr>"; -
trunk/wp-admin/users.php
r6776 r6852 293 293 <tr class="thead"> 294 294 <th><input type="checkbox" onclick="checkAllUsers('<?php echo $role; ?>')"/> </th> 295 <th><?php _e('ID') ?></th>296 295 <th><?php _e('Username') ?></th> 297 296 <th><?php _e('Name') ?></th> 298 297 <th><?php _e('E-mail') ?></th> 299 298 <th><?php _e('Website') ?></th> 300 <th><?php _e('Posts created') ?></th> 301 <th colspan="2" style="text-align: center"><?php _e('Actions') ?></th> 299 <th><?php _e('Posts') ?></th> 302 300 </tr> 303 301 </tbody> … … 357 355 <div id="ajax-response"></div> 358 356 359 <div class="narrow">360 361 357 <?php 362 358 if ( get_option('users_can_register') ) … … 367 363 <form action="#add-new-user" method="post" name="adduser" id="adduser" class="add:user-list:"> 368 364 <?php wp_nonce_field('add-user') ?> 369 <table class=" editform" width="100%" cellspacing="2" cellpadding="5">365 <table class="niceblue"> 370 366 <tr class="form-field form-required"> 371 <th scope="row" width="33%"><?php _e('Username (required)') ?><input name="action" type="hidden" id="action" value="adduser" /></th>372 <td width="66%"><input name="user_login" type="text" id="user_login" value="<?php echo $new_user_login; ?>" /></td>367 <th scope="row"><?php _e('Username (required)') ?><input name="action" type="hidden" id="action" value="adduser" /></th> 368 <td ><input name="user_login" type="text" id="user_login" value="<?php echo $new_user_login; ?>" /></td> 373 369 </tr> 374 370 <tr class="form-field"> … … 422 418 423 419 </div> 424 </div>425 420 426 421 <?php
Note: See TracChangeset
for help on using the changeset viewer.