Yes, it is possible!
Though I have not had the time to document it yet, you can add any custom access permissions you want via the function mgjp_mv_add_permission()
.
For your particular case you are going to want to add the following code into your theme’s functions.php
or alternatively into a custom functions plugin, in order to register the custom permission:
mgjp_mv_add_permission( 'contributor-plus', array(
'description' => 'Contributors and Above',
'select' => 'Contributors Plus',
'logged_in' => true, // whether the user must be logged in
'run_in_admin' => true, // whether to run the access check in admin
'cb' => 'wpst_mv_restrict_only_for_subscribers'
) );
Notice the cb
property, it is the callback that will be called to determine whether a user is finally given access or not. It must return true to grant access or return false or a WP_Error to deny access.
So in the same place you registered the permission, we’ll define the callback function with the following code:
function wpst_mv_restrict_only_for_subscribers() {
if ( current_user_can( 'edit_posts' ) )
return true;
return false;
}
This uses WP’s Roles and Capabilities to determine whether a user is at least contributor. If they are, they are allowed access, if not the function returns false and they are denied access.
Now you should be able to find and set your new custom permission, ‘Contributors Plus’, wherever you need it: in Media Settings as your default protection, or on individual attachments via the Media Vault Metabox.
Let me know if this worked for you!