$ret = array(); foreach ($roles->roles as $k => $v) { if ($skip_admin && $k == 'administrator') { continue; } $ret[$k] = @$v['name']; } return $ret; } static function skipProtection() { global $current_user; // Fix for NextGen plugin if (!function_exists('get_currentuserinfo')) { return false; } get_currentuserinfo(); if (!$current_user) { return false; } $master_roles = self::getOption('disable_protection'); $master_roles = array_merge((array) $master_roles, array('administrator')); if (array_intersect($master_roles, $current_user->roles)) { return true; } return false; } } //if(!defined('AM_VERSION')) am4PluginsManager::init();