diff --git src/wp-includes/class-wp-walker.php src/wp-includes/class-wp-walker.php
index abc99ce..124366d 100644
|
|
|
class Walker { |
| 48 | 48 | public $has_children; |
| 49 | 49 | |
| 50 | 50 | /** |
| | 51 | * Total children of current element. |
| | 52 | * |
| | 53 | * @since 4.7.2 |
| | 54 | * @var int |
| | 55 | */ |
| | 56 | public $total_children; |
| | 57 | |
| | 58 | /** |
| 51 | 59 | * Starts the list before the elements are added. |
| 52 | 60 | * |
| 53 | 61 | * The $args parameter holds additional values that may be used with the child |
| … |
… |
class Walker { |
| 141 | 149 | if ( isset( $args[0] ) && is_array( $args[0] ) ) { |
| 142 | 150 | $args[0]['has_children'] = $this->has_children; // Back-compat. |
| 143 | 151 | } |
| | 152 | |
| | 153 | if ( $this->has_children ) { |
| | 154 | $this->total_children = count( $children_elements[ $id ] ); |
| | 155 | } |
| 144 | 156 | |
| 145 | 157 | $cb_args = array_merge( array(&$output, $element, $depth), $args); |
| 146 | 158 | call_user_func_array(array($this, 'start_el'), $cb_args); |