#4272
Vladimir
Keymaster

This screenshot belongs to other add-on: Content view restrictions, which works for front-end.

I recommended to use another one. If you provide that those restricted pages will have the same IDs at any subsite of your network, you can setup the list of restricted pages, like “1, 3, 7” via custom filters ‘ure_edit_posts_access_id_list’ and ‘ure_edit_posts_access_restriction_type’ as a must use plugin – which will work for any subsite.


add_filter('ure_edit_posts_access_id_list', 'ure_edit_posts_access_set_id_list');

function ure_edit_posts_access_set_id_list($list) {
    $current_user = wp_get_current_user();
    $lib = URE_Lib_Pro::get_instance(); 
    if ($lib->user_can_role($current_user, 'editor')) {
        $list .= ',1,3,7';
    }

    return $list;
}

add_filter('ure_edit_posts_access_restriction_type', 'ure_edit_posts_access_set_restriction_type');

function ure_edit_posts_access_set_restriction_type($restriction_type) {
    $current_user = wp_get_current_user();
    $lib = URE_Lib_Pro::get_instance(); 
    if ($lib->user_can_role($current_user, 'editor')) {
        $restriction_type = 2; // Block
    }
    
    return $restriction_type;
}