$actions) { $role = get_role($slug); if ($role && !in_array($slug, $this->ignores)) { foreach ($actions as $cap => $has) { $has = (int) $has; if ($has != -1) { $b = $role->add_cap($cap, (bool) $has); } } } } return true; } }