[wp-trac] [WordPress Trac] #24153: Sticky flag gets unset if author doesn't have publish_posts permission

WordPress Trac noreply at wordpress.org
Wed May 20 01:02:42 UTC 2015


#24153: Sticky flag gets unset if author doesn't have publish_posts permission
------------------------------------+-----------------------------
 Reporter:  archon810               |       Owner:  chriscct7
     Type:  defect (bug)            |      Status:  accepted
 Priority:  normal                  |   Milestone:  4.3
Component:  Role/Capability         |     Version:  3.5
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  administration
------------------------------------+-----------------------------

Comment (by chriscct7):

 Replying to [comment:10 obenland]:
 > If we change the cap from `edit_others_posts`, to `publish_posts`, users
 with the Author role can pass a true value for `sticky` in the post array
 to make that post sticky. Admittedly an edge case, but hey, devtools FTW!

 how about current_user_can( $ptype->cap->publish_posts ) &&
 current_user_can( $ptype->cap->edit_others_posts) then?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/24153#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list