@@ 55-69 (lines=15) @@ | ||
52 | * @param int $depth Optional. Depth of the current comment. Default 0. |
|
53 | * @param array $args Optional. Uses 'style' argument for type of HTML list. Default empty array. |
|
54 | */ |
|
55 | public function start_lvl( &$output, $depth = 0, $args = array() ) { |
|
56 | $GLOBALS['comment_depth'] = $depth + 1; |
|
57 | ||
58 | switch ( $args['style'] ) { |
|
59 | case 'div': |
|
60 | break; |
|
61 | case 'ol': |
|
62 | $output .= '<ol class="children">' . "\n"; |
|
63 | break; |
|
64 | case 'ul': |
|
65 | default: |
|
66 | $output .= '<ul class="children">' . "\n"; |
|
67 | break; |
|
68 | } |
|
69 | } |
|
70 | ||
71 | /** |
|
72 | * Ends the list of items after the elements are added. |
|
@@ 85-99 (lines=15) @@ | ||
82 | * @param array $args Optional. Will only append content if style argument value is 'ol' or 'ul'. |
|
83 | * Default empty array. |
|
84 | */ |
|
85 | public function end_lvl( &$output, $depth = 0, $args = array() ) { |
|
86 | $GLOBALS['comment_depth'] = $depth + 1; |
|
87 | ||
88 | switch ( $args['style'] ) { |
|
89 | case 'div': |
|
90 | break; |
|
91 | case 'ol': |
|
92 | $output .= "</ol><!-- .children -->\n"; |
|
93 | break; |
|
94 | case 'ul': |
|
95 | default: |
|
96 | $output .= "</ul><!-- .children -->\n"; |
|
97 | break; |
|
98 | } |
|
99 | } |
|
100 | ||
101 | /** |
|
102 | * Traverses elements to create list from elements. |