function prettyPrintLastJump($jump) { error_log($jump, true); $label = trimPageTitle(get_first_heading($jump['page']), 40); if (isset($jump['section'])) { $label = $jump['section'] . ' <sub>(' . substr($label, 0, 5) . '...)</sub>'; } return $label; }
function processTrailArrayForPrinting($trail) { $data = array(); foreach ($trail as $jump) { $pageId = $jump['page']; $name = noNSorNS($pageId); $title = get_first_heading($pageId); if (isset($title)) { $name = $title; } $r['id'] = $pageId; $r['section'] = $jump['section']; $r['name'] = $name; $r['flag'] = $jump['flag']; $data[] = $r; } return $data; }