Make WordPress Core

Opened 12 years ago

Last modified 4 weeks ago

#20717 new enhancement

Filter For Requiring Post Password

Reported by: brandongodwin's profile BrandonGodwin Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: close
Focuses: template Cc:


I've had the need to conditionally disable the password on a post based on criteria that I define in a plugin. In order to do this, I added a filter in the post_password_required() function in wp-includes/post-template.php. This is helpful to allow search engines to crawl password protected pages or allow certain users to view the page without typing in the password.

It would be great if this could get included in the core.

Thanks for your time.

Attachments (2)

post_password_required_filter.patch (437 bytes) - added by BrandonGodwin 12 years ago.
20717.patch (2.7 KB) - added by dlh 10 years ago.

Download all attachments as: .zip

Change History (8)

#1 @hardy101
12 years ago

  • Component changed from Plugins to Template


Using this patch right now to allow admins to see subordinate users' posts on the same blog/site without needing a password.

Thanks for the clean patch file.

Changed component on this ticket to "Template," since this function is called in several places while the post page is being built, including wp-includes/post-template.php.

#2 @nacin
10 years ago

  • Component changed from Template to Posts, Post Types
  • Focuses template added

#3 @McGuive7
10 years ago

Any update on this making it into core? I could use this too.

10 years ago

#4 @dlh
10 years ago

20717.patch refreshes BrandonGodwin's patch for coding and documentation standards.

The patch also cleans up post_password_required() generally and adds tests.

#5 @chriscct7
9 years ago

  • Keywords needs-refresh added

#6 @tw2113
4 weeks ago

  • Keywords close added; has-patch needs-refresh removed

Post password filters have been available in the post_password_required() function since version 4.7.0 so this ticket can very likely be considered closable as handled.

Note: See TracTickets for help on using tickets.