[wp-trac] [WordPress Trac] #4529: "Trash" status for comments and posts

WordPress Trac wp-trac at lists.automattic.com
Sat Aug 1 18:44:35 UTC 2009


#4529: "Trash" status for comments and posts
----------------------------+-----------------------------------------------
 Reporter:  markjaquith     |       Owner:  caesarsgrunt
     Type:  task (blessed)  |      Status:  accepted    
 Priority:  normal          |   Milestone:  2.9         
Component:  Administration  |     Version:              
 Severity:  normal          |    Keywords:  has-patch   
----------------------------+-----------------------------------------------

Comment(by mrmist):

 Currently the trash view and the "Empty Trash" button are visible for
 contributors and authors for both posts and comments.

 There's a few issues.  Firsly, I don't think the button should appear for
 contributors at all, because there's no purpose to it.

 Secondly, if it does appear for some reason, the behaviour should be
 consistent. Currently for comments it just refreshes the view, and for
 posts it gives a wp_die "you can't delete this post" message, which is
 fairly harsh.

 Lastly, for authors, if they "Empty Trash" when posts other than their own
 are in the list, they also get the wp_die error *and* their post is not
 deleted.

 So the attached patch (emptytrash.patch) assumes that we don't show the
 Empty Trash button unless the viewer has the capability to manage the
 entire section.

 It checks against edit_others_posts for posts and moderate_comments for
 comments.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/4529#comment:70>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list