« first day (2137 days earlier)   

6:57 AM
@all Can you look at this answer? Does it just allows any cap that passed to user_has_cap filter? For example if we do a check for current_user_can( 'manage_options') ?
1
A: Wordpress custom user roles with upload_files true but edit_post false, how can i delete and edit media?

jmarceliBased on @Marco answer I think I manage to write it simpler: function allow_attachment_actions( $user_caps, $req_cap, $args ) { // if no post is connected with capabilities check just return original array if ( empty($args[2]) ) return $user_caps; $post = get_post( $args[2] ); if (...

Sorry, I meant attachment related caps.. manage option won't pass for the post type check.
 

« first day (2137 days earlier)