Opened 15 years ago
Closed 15 years ago
#16947 closed defect (bug) (fixed)
Author role should have "Stick this post to the front page" hidden
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.2 | Priority: | normal |
| Severity: | normal | Version: | 2.9 |
| Component: | General | Keywords: | has-patch |
| Focuses: | Cc: |
Description
Currently, making a post sticky depends on the "edit_others_posts" capability. The Author role does not have this by default.
Log in with an Author account.
Go to Add New/Edit Post screen > Publish meta box > Visibility.
Check the "Stick this post to the front page" option.
Click Publish/Update. Visibility is set back to "Public" (not Sticky).
This is the intended behavior, so "Stick this post to the front page" should be hidden from Authors. The related code must be at /wp-admin/includes/meta-boxes.php#L142.
Quick Edit works fine, since it does check for the edit_others_posts cap in /wp-admin/includes/class-wp-posts-list-table.php#L957.
Discovered in WP 3.1, but I think the related piece of code lies there since 2.9.
Side note, it seems a bit weird that an author isn't allowed to unstick a public post, but can unstick it by making it private/protected.