Make WordPress Core

Opened 13 years ago

Closed 12 years ago

#27230 closed enhancement (fixed)

New Action On User Delete Form

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

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 13 years ago.
patch for delete user form action
delete-form-2.patch​ (1.2 KB ) - added by usermrpapa 13 years ago.
delete-form-3.patch​ (1.4 KB ) - added by usermrpapa 13 years ago.
delete-users-filter..patch​ (1.4 KB ) - added by usermrpapa 13 years ago.
delete-user.patch​ (1.3 KB ) - added by usermrpapa 12 years ago.
delete-user2.patch​ (1.3 KB ) - added by usermrpapa 12 years ago.
delete-user3.patch​ (1.2 KB ) - added by usermrpapa 12 years ago.
27230.patch​ (1.2 KB ) - added by SergeyBiryukov 12 years ago.
Fixed formatting

Download all attachments as: .zip

Change History (25)

@usermrpapa
13 years ago

patch for delete user form action

#1 @usermrpapa
13 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
13 years ago

  • Component Administration → Users
  • Focuses administration added
  • Version trunk → 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
13 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
13 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
13 years ago

  • Keywords needs-docs removed

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

how's this?

#6 @usermrpapa
13 years ago

patch refresh for latest trunk changes

#7 @SergeyBiryukov
13 years ago

  • Keywords 4.0-early added
  • Milestone Awaiting Review → Future Release

#8 @usermrpapa
12 years ago

patch refresh for 4.0

#9 @usermrpapa
12 years ago

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

#10 @SergeyBiryukov
12 years ago

  • Milestone Future Release → 4.0

#11 @usermrpapa
12 years ago

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

#12 @kpdesign
12 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
12 years ago

okay, lets try this one...

#14 @samuelsidler
12 years ago

Anything else needed here?

#15 @usermrpapa
12 years ago

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

@SergeyBiryukov
12 years ago

Fixed formatting

#16 @SergeyBiryukov
12 years ago

  • Keywords commit added

#17 @wonderboymusic
12 years ago

  • Owner set to wonderboymusic
  • Resolution → fixed
  • Status new → 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.