WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 14 months ago

Last modified 11 months ago

#44332 closed enhancement (duplicate)

Hook retreive_password (depricated) should be removed

Reported by: subrataemfluence Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.5.1
Component: Users Keywords:
Focuses: Cc:

Description

Since the function retreive_password no longer exists in the framework any more, I think we should remove it from get_password_reset_key function. Currently it has documented as

* @deprecated 1.5.1 Misspelled. Use 'retrieve_password' hook instead.
  • File: wp-includes/user.php
  • Line number: 2205

Proposed patch added.

Attachments (1)

44332.diff (648 bytes) - added by subrataemfluence 3 years ago.

Download all attachments as: .zip

Change History (7)

#1 follow-up: @birgire
3 years ago

  • Version set to 1.5.1

There's also the do_action_deprecated() function introduced in 4.6:

When an action hook is deprecated, the do_action() call is replaced with do_action_deprecated(), which triggers a deprecation notice and then fires the original hook.

Similarly the apply_filters_deprecated() function.

So in this case it might be replaced with:

do_action_deprecated( 'retreive_password', array( $user->user_login ), '1.5.1', 'retrieve_password' );

It would be interesting to scan the wordpress.org plugin repository to see if any plugin is using this deprecated filter.

@subrataemfluence, what do you think about this kind of approach, before removing?

Version 3, edited 3 years ago by birgire (previous) (next) (diff)

#2 @ocean90
3 years ago

  • Keywords needs-patch added; dev-feedback removed
  • Milestone changed from Awaiting Review to Future Release

+1 for do_action_deprecated().

#3 in reply to: ↑ 1 @subrataemfluence
3 years ago

Perfect! I love the idea. Still a learner :)

Replying to birgire:

There's also the do_action_deprecated() function introduced in 4.6:

When an action hook is deprecated, the do_action() call is replaced with do_action_deprecated(), which triggers a deprecation notice and then fires the original hook.

Similarly the apply_filters_deprecated() function for deprecated filters.

So in this case it might be replaced with:

do_action_deprecated( 'retreive_password', array( $user->user_login ), '1.5.1', 'retrieve_password' );

It would be interesting to scan the wordpress.org plugin repository to see if any plugin is using this deprecated filter.

@subrataemfluence, what do you think about this kind of approach, before removing?

#4 @Mista-Flo
14 months ago

  • Keywords close added; needs-patch removed
  • Resolution set to worksforme
  • Status changed from new to closed

It seems it was already handled by Sergey 10 months ago in #48255 so it's good we can close this ticket.

#5 @SergeyBiryukov
14 months ago

  • Resolution changed from worksforme to duplicate

Duplicate of #48255.

#6 @desrosj
11 months ago

  • Keywords close removed
  • Milestone Future Release deleted
Note: See TracTickets for help on using tickets.