Restrict access to specific widget field based on user role

I ended up adding the class ‘ab-ads’ to all my widget areas.

if ( !is_super_admin() ) {
  add_action('admin_print_styles-widgets.php', function() {
      echo '<style type="text/css">div.sidebar-widgets-ab-ads { display:none; }</style>';
  });
}

That way I just hide them for everyone that isn’t administrators.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)