[wp-trac] [WordPress Trac] #30352: Prevent an editor to move the front page / posts page to trash

WordPress Trac noreply at wordpress.org
Sun Feb 15 04:58:50 UTC 2015


#30352: Prevent an editor to move the front page / posts page to trash
----------------------------------------+-----------------------------
 Reporter:  benoitchantre               |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Posts, Post Types           |     Version:  4.0
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+-----------------------------

Comment (by mrahmadawais):

 I have the logic ready, just unable to figure out where to add it.
 Can't do it in wp-admin/edit.php.
 Reviewed wp-admin/includes/class-wp-post-list-table.php and added the
 check and it works, but an editor can always go inside the page and trash
 it from there.

 So, I figured the better way to stop editor from deleting a page which is
 being used as front page should be editing the user's capability of
 {{{
 delete_pages
 }}}

 Now unable to figure it out where to do that. Looking inside /wp-
 admin/includes/schema.php but I think it's not right. Looking for
 pointers.

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


More information about the wp-trac mailing list