0

I have implemented a customized WP_List_Table that displays a list of users with custom roles. I also managed to exclude those users in the Users admin page, so these can be managed separately.

Now, whenever I get to edit or delete an user, after submitting these changes, I get redirected to the Users admin page, and not back to my customized admin page.

How can I change the redirection after submitting these actions?

Edit: I've extended WP_List_Table class in many parts. The following piece of code is the method relevant for displaying the links "Edit" and "Delete" below the User's name.

function column_name_client($item) {
  $nonce = wp_create_nonce('delete_user-'.$item['id_client']);

  $actions = array(
    'edit'   => sprintf('<a href="user-edit.php?user_id=%s">Edit</a>', $item['id_client']),
    'delete' => "<a class='submitdelete' href='" . wp_nonce_url( "users.php?action=delete&amp;user={$item['id_client']}", 'bulk-users' ) . "'>" . 'Delete' . "</a>"
  );

  return sprintf(
    '<strong><a href="user-edit.php?user_id=%s">%s</a></strong> %s',
    $item['id_client'],
    $item['name_client'],
    $this->row_actions($actions)
  );
}
  • I think we need to see some code if we are to help. – Andy Macaulay-Brook Aug 8 '16 at 19:28
  • @AndyMacaulay-Brook: I added some code, as requested. – noquierouser Aug 8 '16 at 19:37
  • what do you do at your custom page that you cannot do on the standard users list ? – mmm Sep 15 '16 at 7:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.