Capability to prevent upload of files

You can try with this: function remove_media_tabs($strings) { unset($strings[“insertFromUrlTitle”]); unset($strings[“setFeaturedImageTitle”]); unset($strings[“createGalleryTitle”]); unset($strings[“uploadFilesTitle”]); return $strings; } add_filter(‘media_view_strings’,’remove_media_tabs’); This will remove ‘Upload file’ and ‘Insert from URL’ links when you open insert media screen, so user will be able only to select images or whatever that is already in media library. For more things you can do … Read more

Custom post type submenu capabilities – custom plugin

So to answer my question… I don’t know if it is the best approach: In the custom post type I added capabilities to which only admin has priviliges like so: ‘capabilities’=>array( ‘edit_post’=>’update_core’, ‘read_post’=>’update_core’, ‘delete_post’=>’update_core’, ‘edit_posts’=>’update_core’, ‘edit_others_posts’=>’update_core’, ‘publish_posts’=>’update_core’, ‘read_private_posts’=>’update_core’ ), And then I also did that for custom taxonomies like so: ‘capabilities’=>array( ‘manage_terms’=>’manage_options’, ‘edit_terms’=>’manage_options’, ‘delete_terms’=>’manage_options’, ‘assign_terms’=>’manage_options’, … Read more