Is there a way to stop all but admins from using the Post Level Restriction Feature when creating a post - I dont want anyone but an admin to be able to restrict the content.
Remove Meta Box on Post/Page
Hi Sean,
s2 checks for the user’s capability to edit posts or pages, but I understand you want someone to edit the post without setting s2 restrictions…
I guess you could use the hook ws_plugin__s2member_before_security_meta_box
in src/includes/classes/meta-box-security.inc.php and set $post
to false if the user is not admin… https://s2member.com/kb-article/hacking-s2member-plugin-w-hooksfilters-for-wordpress/
Maybe something like this (untested):
<?php
add_action('ws_plugin__s2member_before_security_meta_box', function ($vars = array()) {
if (!current_user_is('administrator'))
$vars['__refs']['post'] = false;
});