Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#23603 closed defect (bug) (fixed)

Custom post password form label

Reported by: soulseekah's profile soulseekah Owned by: nacin's profile nacin
Milestone: 3.7 Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch 3.7-early commit
Focuses: Cc:

Description

get_the_password_form() hardcodes the password protected message.

__("This post is password protected. To view it please enter your password below:")

This results in misbehavior, wherein all post types (including Pages) do not make a distinction between what is password protected.
Considering the difficulty of chunking up that string to be dynamic and more importantly easily localizable, I attach a draft patch which makes that message a label instead.

Attachments (2)

password_protected.patch (1.8 KB) - added by soulseekah 12 years ago.
23603.diff (880 bytes) - added by MikeHansenMe 12 years ago.

Download all attachments as: .zip

Change History (11)

#1 @SergeyBiryukov
12 years ago

How about "This content is password protected"?

#2 @kovshenin
12 years ago

  • Cc kovshenin added
  • Keywords has-patch added

@MikeHansenMe
12 years ago

#3 follow-ups: @MikeHansenMe
12 years ago

I like "This content is password protected". Any translations would have to be updated with this though.

#4 in reply to: ↑ 3 @SergeyBiryukov
12 years ago

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

#5 in reply to: ↑ 3 @SergeyBiryukov
12 years ago

Replying to MikeHansenMe:

I like "This content is password protected". Any translations would have to be updated with this though.

Each major release generally has about a hundred or more new strings anyway.

#6 @wonderboymusic
12 years ago

  • Milestone changed from Future Release to 3.7

these are all marked 3.7-early

#7 @SergeyBiryukov
12 years ago

  • Keywords commit added

The whole form is filterable, so it's currently possible to change the text, although in a hacky way. 23603.diff should make it work for any post type.

#8 @helen
12 years ago

No objections. Anybody else?

#9 @nacin
12 years ago

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

In 25582:

Change 'This post is password protected' to 'This content', for the benefit of custom post types.

props MikeHansenMe.
fixes #23603.

Note: See TracTickets for help on using tickets.