Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#32116 closed enhancement (fixed)

Pass errors object to lostpassword_post hook

Reported by: thedeadmedic's profile TheDeadMedic Owned by: drewapicture's profile DrewAPicture
Milestone: 4.4 Priority: normal
Severity: normal Version: 2.1
Component: Login and Registration Keywords: has-patch
Focuses: Cc:

Description

It would be super handy if plugins/themes could add their own errors when using the lostpassword_post hook.

Attachments (3)

lost-password-errors.diff (752 bytes) - added by TheDeadMedic 10 years ago.
32116.diff (515 bytes) - added by iamfriendly 9 years ago.
Added the errors object to the lospassword_post action. Includes updated docs.
32116.2.diff (581 bytes) - added by iamfriendly 9 years ago.
added the correct PHPDoc for the additional parameter

Download all attachments as: .zip

Change History (9)

#1 @johnbillion
10 years ago

  • Keywords needs-patch needs-docs added
  • Version changed from trunk to 2.1

Thanks for the patch, TheDeadMedic.

There's no longer any need to use do_action_ref_array() in order to pass an object to an action. Adding $errors as the second parameter to do_action() should be fine.

See #16661 for some discussion.

Also needs some filter documentation.

@iamfriendly
9 years ago

Added the errors object to the lospassword_post action. Includes updated docs.

#2 @iamfriendly
9 years ago

  • Keywords has-patch added; needs-patch needs-docs removed

Refreshed the patch and added docs.

#3 @DrewAPicture
9 years ago

Hi @iamfriendly, instead of mentioning it at the end of the parameter description, there should be a proper changelog entry in the DocBlock, e.g. {

* @since 4.4.0 Added the `$errors` parameter.

#4 @DrewAPicture
9 years ago

  • Milestone changed from Awaiting Review to 4.4

This ticket was mentioned in Slack in #docs by richardtape. View the logs.


9 years ago

@iamfriendly
9 years ago

added the correct PHPDoc for the additional parameter

#6 @DrewAPicture
9 years ago

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

In 34885:

Login: Pass the $errors object as a parameter to the lostpassword_post hook.

Props iamfriendly.
Fixes #32116.

Note: See TracTickets for help on using tickets.