WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 18 months ago

#36691 new enhancement

Ability to disable "Password Protected" post option

Reported by: paulschreiber Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Role/Capability Keywords: needs-patch
Focuses: Cc:

Description

We don't want any of our posts accidentally being published as "password protected."

It would be helpful to have a filter to disable that part of the UI.

Attachments (1)

36691.patch (1.4 KB) - added by paulschreiber 3 years ago.

Download all attachments as: .zip

Change History (8)

@paulschreiber
3 years ago

#1 @paulschreiber
3 years ago

  • Keywords has-patch added

This ticket was mentioned in Slack in #core by paulschreiber. View the logs.


3 years ago

#3 follow-up: @swissspidy
3 years ago

  • Component changed from General to Role/Capability
  • Keywords needs-patch added; has-patch removed

This should rather be a new capability instead of a filter. There are other ways to create password protected posts, so a filter to disable the form on the post edit screen is not enough.

There are delete_private_posts, edit_private_posts and read_private_posts — so what about adding publish_private_posts? Perhaps it could by default map to edit_private_posts or publish_posts.

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

Replying to swissspidy:

There are delete_private_posts, edit_private_posts and read_private_posts — so what about adding publish_private_posts?

Private ≠ password protected though, so this might be confusing.

#24669 offers another approach: 'Password protected' and 'Private' should be two separate post type features.

#5 follow-up: @paulschreiber
3 years ago

#24669 is three years old and closed.

I'm currently using CSS to disable this, which is a bit of a hack. Adding capabilities for password-protected posts seems like a time-consuming and involved operation. This patch is small / fast / safer. Can we consider including it in 4.6 or 4.7?

#6 in reply to: ↑ 5 @ocean90
3 years ago

  • Version trunk deleted

Replying to paulschreiber:

This patch is small / fast / safer. Can we consider including it in 4.6 or 4.7?

It's not safer. You still can add a password when you add the required HTML back into the page. For 4.6 it's too late since we're already in beta.

P.S.: Actions and filters need to be documented, see https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#4-hooks-actions-and-filters.

#7 @SergeyBiryukov
18 months ago

#43478 was marked as a duplicate.

Note: See TracTickets for help on using tickets.