Show special backend content for certain roles

Possible Reasons –

  1. current_user_can() function needs an input of a capability not user role, though it works sometime but we should not use user role as a input to this function.
  2. you’re passing the subscriber object to function which is a lowest possible role we can have on WordPress. That’s why !current_user_can('subscriber') makes it unavailable for all.

Have a look at WordPress Documentation of Capabilities Vs Roles table, Use that table to determine which capability you can use to hide it or show to particular role. To show the box to Editor you can use capability moderate_comments .

E.g -   if ( current_user_can ('moderate_comments') ) 
        {
            //To see this visible you should have at-least Editor privileges
        } 

Note –

I recommend using wp_get_current_user() function. This can be used to grab user role and show specific content. The content will be available to that user only, Not even users with higher privileges can see it.

   // Add a widget to the WordPress dashboard
    function wpc_dashboard_widget_function() 
    {
        global $wp_roles;
        $current_user = wp_get_current_user();
        $roles = $current_user->roles;
        $role = array_shift($roles);

        if($role == 'administrator')
        {
            // This is only for Admins
            echo '<div><h4>Special Offer One</h4><div>Special Offer Text will go here!</div></div>';
        }
    }
    function wpc_add_dashboard_widgets() 
    {
        wp_add_dashboard_widget('wp_dashboard_widget', 'Special Offers Just For   
        Vendors', 'wpc_dashboard_widget_function');
    }
    add_action('wp_dashboard_setup', 'wpc_add_dashboard_widgets' );