"mark", "text" => elgg_view_icon("delete"), "title" => elgg_echo("site_announcements:menu:entity:mark"), "href" => "action/site_announcements/mark?guid=" . $entity->getGUID(), "rel" => $entity->getGUID(), "is_action" => true )); } else { // admin has different items than site $allowed_menu_items = array("access", "edit", "delete"); foreach ($returnvalue as $index => $menu_item) { if (!in_array($menu_item->getName(), $allowed_menu_items)) { unset($returnvalue[$index]); } } } return $returnvalue; } }