diff --git src/wp-includes/class-wp-walker.php src/wp-includes/class-wp-walker.php
index 5ed8aad..51f4fb9 100644
|
|
class Walker { |
47 | 47 | public $has_children; |
48 | 48 | |
49 | 49 | /** |
| 50 | * Total children of current element. |
| 51 | * |
| 52 | * @since 4.7.2 |
| 53 | * @var bool |
| 54 | */ |
| 55 | public $total_children; |
| 56 | |
| 57 | /** |
| 58 | * Total children of current element. |
| 59 | * |
| 60 | * @since 4.7.2 |
| 61 | * @var int |
| 62 | */ |
| 63 | public $total_children; |
| 64 | |
| 65 | /** |
50 | 66 | * Starts the list before the elements are added. |
51 | 67 | * |
52 | 68 | * The $args parameter holds additional values that may be used with the child |
… |
… |
class Walker { |
140 | 156 | if ( isset( $args[0] ) && is_array( $args[0] ) ) { |
141 | 157 | $args[0]['has_children'] = $this->has_children; // Back-compat. |
142 | 158 | } |
| 159 | |
| 160 | if ( $this->has_children ) { |
| 161 | $this->total_children = count( $children_elements[ $id ] ); |
| 162 | } |
| 163 | |
| 164 | $this->total_children = 0; |
| 165 | if ( $this->has_children ) { |
| 166 | $this->total_children = count( $children_elements[ $id ] ); |
| 167 | } |
143 | 168 | |
144 | 169 | $cb_args = array_merge( array(&$output, $element, $depth), $args); |
145 | 170 | call_user_func_array(array($this, 'start_el'), $cb_args); |
… |
… |
class Walker { |
402 | 427 | /** |
403 | 428 | * Unset all the children for a given top level element. |
404 | 429 | * |
405 | | * @since 2.7.0 |
406 | | * |
407 | 430 | * @param object $e |
408 | 431 | * @param array $children_elements |
409 | 432 | */ |