WordPress.org

Make WordPress Core

Opened 21 months ago

Closed 19 months ago

Last modified 19 months ago

#21288 closed enhancement (fixed)

Add meta cap for publish_post

Reported by: gcorne Owned by: ryan
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: Role/Capability Keywords: has-patch
Focuses: Cc:

Description

While throughout the core codebase meta_caps for read_post, edit_post, and delete_post are used, there isn't a meta_cap for publish_post. For completeness, there should also be a meta_cap for create_post. Having more granular capabilities is important for developers that are trying to use WordPress for larger, more complex installations or as more of an application development framework.

Attachments (1)

21288.diff (552 bytes) - added by nacin 19 months ago.
I guess this is the crux of it.

Download all attachments as: .zip

Change History (11)

comment:1 scribu21 months ago

  • Summary changed from Add meta caps for publish_post and perhaps create_post to Add meta cap for publish_post

For create_post: #16714

comment:2 nacin21 months ago

  • Milestone changed from Awaiting Review to 3.5

We should definitely have a cap for publish_post.

comment:3 greenshady20 months ago

  • Cc justin@… added

comment:4 bpetty19 months ago

  • Keywords needs-patch added

comment:5 technosailor19 months ago

There isn't edit_post, et all, but there is edit_posts. There is also publish_posts. Was this ticket fixed and not closed?

comment:6 technosailor19 months ago

meta_cap... Ignore me.

nacin19 months ago

I guess this is the crux of it.

comment:7 nacin19 months ago

  • Keywords has-patch added; needs-patch removed

comment:8 ryan19 months ago

Looks good.

comment:9 ryan19 months ago

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

In [22056]:

Add publish_post meta cap. Props nacin. fixes #21288

Note: See TracTickets for help on using tickets.