Skip to content

Commit

Permalink
Change available edit actions on a row to be consistent with other us…
Browse files Browse the repository at this point in the history
…er managment
  • Loading branch information
joshbetz committed Jun 13, 2012
1 parent bc96db7 commit 24da075
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 5 additions & 5 deletions includes/class-vip-user-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ function column_cb($item){

function column_username($item){
$actions = array();
$actions['edit'] = '<a href="#">Edit</a>';
if ( get_current_user_id() !== $item->ID )
$actions['delete'] = '<a href="#">Delete</a>';
if ( get_current_user_id() == $item->ID ) {
$actions['edit'] = '<a href="' . admin_url('profile.php') . '">Edit</a>';

This comment has been minimized.

Copy link
@danielbachhuber

danielbachhuber Jun 16, 2012

Contributor

Maybe we should follow core and allow the current user to edit any users if they have the appropriate cap?

}

return sprintf( __('%1$s %2$s <span style="color:silver">(id:%3$s)</span>%4$s', 'vip-dashboard' ),
/*$1%s*/ get_avatar($item->ID, 32),
/*$2%s*/ $item->user_login,
Expand Down Expand Up @@ -190,7 +190,7 @@ function inline_edit() {
</div></fieldset>

<fieldset class="inline-edit-col-left"><div class="inline-edit-col">
<span class="title inline-edit-categories-label"><?php _e( 'Bulk Edit', 'vip-dashboard' ) ?></span>
<span class="title inline-edit-categories-label"><?php _e( 'Sites', 'vip-dashboard' ) ?></span>

<ul class="cat-checklist category-checklist">
<?php foreach ( $this->blog_ids() as $id ): ?>
Expand Down
4 changes: 1 addition & 3 deletions vip-dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function admin_init() {

if ( isset($_REQUEST['action']) && 'modify' == $_REQUEST['action'] ) {
$this->handle_promote_users_form();
} elseif ( isset($_REQUEST['action']) && 'createuser' == $_REQUEST['action'] ) {
} elseif ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) {
$this->handle_create_users_form();
}
}
Expand Down Expand Up @@ -138,8 +138,6 @@ public function handle_create_users_form() {
check_admin_referer( 'vip-dashboard-add-users', 'vip-dashboard-add-users' );
$redirect = "admin.php?page=vip_dashboard_users";

//

wp_redirect(add_query_arg('update', $update, $redirect));
exit();
}
Expand Down

0 comments on commit 24da075

Please sign in to comment.