[wp-trac] [WordPress Trac] #19834: More Robust Capabilities for Attachments

WordPress Trac noreply at wordpress.org
Mon Nov 5 12:17:16 UTC 2012


#19834: More Robust Capabilities for Attachments
-----------------------------+------------------------------
 Reporter:  walkinonwat3r    |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Media            |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  needs-patch      |
-----------------------------+------------------------------
Changes (by dennisderoo):

 * cc: dennisderoo (added)


Comment:

 i've found out the solution (hack) for this:

 {{{
 function crunchhack() {

     global $wp_post_types;
     $wp_post_types['attachment']->cap->edit_post = 'upload_files';

 }
 add_action( 'init', 'crunchhack' );
 }}}

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


More information about the wp-trac mailing list