Restrict plugin View As only to “superior” admins

[ad_1]

Hi @socialink,

You could customize the capabilities needed to access this plugin, see: https://github.com/JoryHogeveen/view-admin-as/wiki/Filters#view_admin_as_full_access_capabilities

You could set your own user as a superior user and then create a custom capability no role has, this can be anything.

Example:

add_filter( 'view_admin_as_full_access_capabilities', function( $caps ) {
    return array( 'YOU_SHALL_NOT_PASS' );
}, 10 );

Hope this helps!

Cheers, Jory

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer