[wp-trac] [WordPress Trac] #32617: After adding the 'edit_posts' capability to 'subscriber' and turning off, the added role still remains

WordPress Trac noreply at wordpress.org
Fri Jun 12 10:56:58 UTC 2015


#32617: After adding the 'edit_posts' capability to 'subscriber' and turning off,
the added role still remains
-----------------------------+------------------------------
 Reporter:  DJviolin         |       Owner:
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Role/Capability  |     Version:  4.2.2
 Severity:  normal           |  Resolution:  invalid
 Keywords:                   |     Focuses:  administration
-----------------------------+------------------------------

Comment (by DJviolin):

 I found the solution here:
 [https://core.trac.wordpress.org/ticket/19834#comment:19]

 I modified to my needs:


 {{{
 function fix_media_permissions() {
     global $wp_post_types;
     $wp_post_types['attachment']->cap->edit_posts = 'upload_files';
     //$wp_post_types['attachment']->cap->delete_posts = 'upload_files';
 }
 }}}

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


More information about the wp-trac mailing list