Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#27230 closed enhancement (fixed)

New Action On User Delete Form

Reported by: usermrpapa's profile usermrpapa Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.8
Component: Users Keywords: has-patch 4.0-early commit
Focuses: administration Cc:

Description

When deleting a user, it would be nice to have an action fired before the end of the form in order for plugins to add additional questions/options to the form before a user is deleted.

Attachments (8)

delete-form.patch (674 bytes) - added by usermrpapa 11 years ago.
patch for delete user form action
delete-form-2.patch (1.2 KB) - added by usermrpapa 11 years ago.
delete-form-3.patch (1.4 KB) - added by usermrpapa 11 years ago.
delete-users-filter..patch (1.4 KB) - added by usermrpapa 11 years ago.
delete-user.patch (1.3 KB) - added by usermrpapa 10 years ago.
delete-user2.patch (1.3 KB) - added by usermrpapa 10 years ago.
delete-user3.patch (1.2 KB) - added by usermrpapa 10 years ago.
27230.patch (1.2 KB) - added by SergeyBiryukov 10 years ago.
Fixed formatting

Download all attachments as: .zip

Change History (25)

@usermrpapa
11 years ago

patch for delete user form action

#1 @usermrpapa
11 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
11 years ago

  • Component changed from Administration to Users
  • Focuses administration added
  • Version changed from trunk to 3.8

If we add a hook in there, it should also be added to confirm_delete_users() for Multisite: tags/3.8.1/src/wp-admin/network/users.php#L19.

It also needs to be documented: http://make.wordpress.org/core/handbook/inline-documentation-standards/php-documentation-standards/#4-hooks-actions-and-filters.

#3 follow-up: @usermrpapa
11 years ago

new patch for ms too... unsure if it should be same hook name or different... left it same...

can update docs too once its committed...

#4 in reply to: ↑ 3 @DrewAPicture
11 years ago

  • Keywords needs-docs added

Replying to usermrpapa:

new patch for ms too... unsure if it should be same hook name or different... left it same...

can update docs too once its committed...

Actually, the hook docs need to be included for the patch to even be considered for commit :)

If you need assistance writing the hook docs, I can provide feedback for you.

#5 @usermrpapa
11 years ago

  • Keywords needs-docs removed

doh... got it - was thinking codex...

how's this?

#6 @usermrpapa
11 years ago

patch refresh for latest trunk changes

#7 @SergeyBiryukov
11 years ago

  • Keywords 4.0-early added
  • Milestone changed from Awaiting Review to Future Release

#8 @usermrpapa
10 years ago

patch refresh for 4.0

#9 @usermrpapa
10 years ago

its 4.0 early... any chance of getting this in? ;)

#10 @SergeyBiryukov
10 years ago

  • Milestone changed from Future Release to 4.0

#11 @usermrpapa
10 years ago

hmmm... not sure why they wouldnt be tabs... please try this one... and used 3 digit version notation... thanks..

#12 @kpdesign
10 years ago

@usermrpapa: Thanks for the updated patch.

You will need to include the documentation for the parameter $current_user in the doc block in wp-admin/users.php.

The second instance of the hook in wp-admin/network/users.php should be marked as a duplicate hook.

I'd also suggest shortening the description to "Fires at the end of the delete users form prior to the confirm button."

#13 @usermrpapa
10 years ago

okay, lets try this one...

#14 @samuelsidler
10 years ago

Anything else needed here?

#15 @usermrpapa
10 years ago

hope not, but dont think you were asking me... :)

@SergeyBiryukov
10 years ago

Fixed formatting

#16 @SergeyBiryukov
10 years ago

  • Keywords commit added

#17 @wonderboymusic
10 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 28885:

Add new action 'delete_user_form' in wp-admin/users.php and wp-admin/network/users.php.

Props SergeyBiryukov, usermrpapa.
Fixes #27230.

Note: See TracTickets for help on using tickets.