Make WordPress Core

Opened 10 years ago

Closed 3 years ago

Last modified 3 years ago

#29008 closed enhancement (fixed)

Add additional variables to the_password_form filter

Reported by: silb3r's profile silb3r Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-dev-note
Focuses: template Cc:

Description

This will vastly improve markup edits without resorting to str_replace().

Attachments (1)

additional_filter_variables_for_the_password_form.diff (553 bytes) - added by silb3r 10 years ago.
Additional filters for the_password_form filter

Download all attachments as: .zip

Change History (9)

@silb3r
10 years ago

Additional filters for the_password_form filter

#1 follow-up: @obenland
10 years ago

Hi silb3r, would you mind sharing you use case where you have to resort to str_replace()?

#2 in reply to: ↑ 1 @silb3r
10 years ago

Replying to obenland:

Hi silb3r, would you mind sharing you use case where you have to resort to str_replace()?

Use cases could be if you want to change the submit <input> into a <button> element or move the password <input> outside the <label> element.

Version 0, edited 10 years ago by silb3r (next)

#3 @obenland
10 years ago

  • Version trunk deleted

#4 @wonderboymusic
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

No movement in a year - as far as I can tell, the ID that $label represents is arbitrary and doesn't have to be maintained in a new UI

#5 @SergeyBiryukov
3 years ago

  • Milestone set to 5.8
  • Resolution wontfix deleted
  • Status changed from closed to reopened

Related: #53091

It might be a good idea to pass the $post argument to the_password_form filter, for consistency with some other filters like the_title or post_password_required.

#6 @SergeyBiryukov
3 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from reopened to closed

In 50791:

Posts, Post Types: Pass the post object to the_password_form filter.

Props silb3r.
Fixes #29008.

#7 @audrasjb
3 years ago

  • Keywords needs-dev-note added
Note: See TracTickets for help on using tickets.