These are functions in qa-theme-base.php
public function set_context($key, $value)
{
$this->context[$key] = $value;
}
/**
* Clear some context (used at the end of the appropriate loop).
* @param $key
*/
public function clear_context($key)
{
unset($this->context[$key]);
}
public function nav_list($navigation, $class, $level = null)
{
$this->output('<ul class="qa-' . $class . '-list' . (isset($level) ? (' qa-' . $class . '-list-' . $level) : '') . '">');
$index = 0;
foreach ($navigation as $key => $navlink) {
$this->set_context('nav_key', $key);
$this->set_context('nav_index', $index++);
$this->nav_item($key, $navlink, $class, $level);
}
$this->clear_context('nav_key');
$this->clear_context('nav_index');
$this->output('</ul>');
}
public function nav_clear($navtype)
{
$this->output(
'<div class="qa-nav-' . $navtype . '-clear">',
'</div>'
);
}
public function nav_item($key, $navlink, $class, $level = null)
{
$suffix = strtr($key, array( // map special character in navigation key
'$' => '',
'/' => '-',
));
$this->output('<li class="qa-' . $class . '-item' . (@$navlink['opposite'] ? '-opp' : '') .
(@$navlink['state'] ? (' qa-' . $class . '-' . $navlink['state']) : '') . ' qa-' . $class . '-' . $suffix . '">');
$this->nav_link($navlink, $class);
$subnav = isset($navlink['subnav']) ? $navlink['subnav'] : array();
if (is_array($subnav) && count($subnav) > 0) {
$this->nav_list($subnav, $class, 1 + $level);
}
$this->output('</li>');
}
public function nav_link($navlink, $class)
{
if (isset($navlink['url'])) {
$this->output(
'<a href="' . $navlink['url'] . '" class="qa-' . $class . '-link' .
(@$navlink['selected'] ? (' qa-' . $class . '-selected') : '') .
(@$navlink['favorited'] ? (' qa-' . $class . '-favorited') : '') .
'"' . (strlen(@$navlink['popup']) ? (' title="' . $navlink['popup'] . '"') : '') .
(isset($navlink['target']) ? (' target="' . $navlink['target'] . '"') : '') . '>' . $navlink['label'] .
'</a>'
);
} else {
$this->output(
'<span class="qa-' . $class . '-nolink' . (@$navlink['selected'] ? (' qa-' . $class . '-selected') : '') .
(@$navlink['favorited'] ? (' qa-' . $class . '-favorited') : '') . '"' .
(strlen(@$navlink['popup']) ? (' title="' . $navlink['popup'] . '"') : '') .
'>' . $navlink['label'] . '</span>'
);
}
if (strlen(@$navlink['note']))
$this->output('<span class="qa-' . $class . '-note">' . $navlink['note'] . '</span>');
}