Make WordPress Core

Ticket #15932: manage_users_action_links.diff

File manage_users_action_links.diff, 930 bytes (added by jshreve, 15 years ago)

Adds a manage_users_action_links filter

  • wp-admin/includes/class-wp-ms-users-list-table.php

     
    184184                                                                if ( current_user_can( 'delete_user', $user->ID) && ! in_array( $user->user_login, $super_admins ) ) {
    185185                                                                        $actions['delete'] = '<a href="' . $delete = esc_url( network_admin_url( add_query_arg( '_wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), wp_nonce_url( 'edit.php', 'deleteuser' ) . '&amp;action=deleteuser&amp;id=' . $user->ID ) ) ) . '" class="delete">' . __( 'Delete' ) . '</a>';
    186186                                                                }
    187 
     187                                                               
     188                                                                $actions = apply_filters( 'manage_users_action_links', array_filter( $actions ), $user->ID, $user->user_login );
    188189                                                                echo $this->row_actions( $actions );
    189190                                                        ?>
    190191                                                </td>