| @@ 322-337 (lines=16) @@ | ||
| 319 | * |
|
| 320 | * @return boolean |
|
| 321 | */ |
|
| 322 | protected function update_child_levels() { |
|
| 323 | if ( is_array( $this->children ) ) { |
|
| 324 | foreach ( $this->children as $child ) { |
|
| 325 | $child->level = $this->level + 1; |
|
| 326 | $child->update_child_levels(); |
|
| 327 | } |
|
| 328 | ||
| 329 | return true; |
|
| 330 | } |
|
| 331 | ||
| 332 | return false; |
|
| 333 | } |
|
| 334 | } |
|
| 335 | ||
| @@ 147-162 (lines=16) @@ | ||
| 144 | * |
|
| 145 | * @return boolean |
|
| 146 | */ |
|
| 147 | protected function update_child_levels() { |
|
| 148 | if ( is_array( $this->children ) ) { |
|
| 149 | foreach ( $this->children as $child ) { |
|
| 150 | $child->level = $this->level + 1; |
|
| 151 | $child->update_child_levels(); |
|
| 152 | } |
|
| 153 | ||
| 154 | return true; |
|
| 155 | } |
|
| 156 | ||
| 157 | return false; |
|
| 158 | } |
|
| 159 | } |
|
| 160 | ||