pathname['/'] = get_settings('blogname');
}
function get_breadcrumb($div = 'navi', $sep = '»', $page = 'page')
{
$title = wp_title('', false);
echo '
', "\n", "
\n", " - ";
$d = explode('/', preg_replace('!/(index\.\w+)?$!', '',
array_shift(explode('?', $_SERVER['REQUEST_URI'], 2))));
$n = count($d) - 1;
$p = '/';
if ($n > 0) {
echo '',
isset($this->pathname[$p])
? $this->pathname[$p]
: 'root',
"
\n - ", $sep, " ";
if (strcmp($d[$n - 1], 'page') == 0) {
$navipath = array(ucfirst($page) . ' ' . $d[$n]);
$n--;
}
for ($i=1; $i < $n; $i++) {
$p .= $d[$i] . '/';
echo '',
isset($this->pathname[$p])
? $this->pathname[$p]
: ucfirst($d[$i]),
"
\n - ", $sep, " ";
}
}
if (is_array($navipath) && !empty($navipath)) {
$npl = array_pop($navipath);
foreach ($navipath as $np) {
echo $np, "
\n - ", $sep, " ";
}
echo $npl;
} else {
if ($n > 0) $p .= $d[$n] . '/';
echo
isset($this->pathname[$p])
? $this->pathname[$p]
: (empty($title) ? ucfirst($d[$n]) : $title);
}
echo "
\n", "
\n", "
\n\n";
}
}
$wppURIBreadcrumb = new URIBreadcrumb;
function get_breadcrumb($div = 'navi', $sep = '»', $page = 'page')
{
global $wppURIBreadcrumb;
$wppURIBreadcrumb->get_breadcrumb($div, $sep, $page);
}
?>