= 0) { $depth = $args[$i]; continue; } } } } if (! isset($count[$page])) $count[$page] = array(); if (! isset($count[$page][$basename])) $count[$page][$basename] = array(); $count[$page][$basename][$depth]++; $number = ''; if ($depth == 0) { if (! isset($count[$page][$basename][$depth])) $count[$page][$basename][$depth] = PLUGIN_NUMBER_BEGIN_DEFAULT; $number = $count[$page][$basename][$depth]; } else { for ($i = 1; $i <= $depth; $i++) { if (! isset($count[$page][$basename][$i])) $count[$page][$basename][$i] = PLUGIN_NUMBER_BEGIN_DEFAULT; if ($i > $lastdepth) { $count[$page][$basename][$i] = PLUGIN_NUMBER_BEGIN_DEFAULT; } $number .= $count[$page][$basename][$i]; if ($i != $depth) { $number .= '.'; } } $lastdepth = $depth; } $string = <<