wpseek.com
A WordPress-centric search engine for devs and theme authors
block_core_page_list_nest_pages › WordPress Function
Since5.8.0
Deprecatedn/a
› block_core_page_list_nest_pages ( $current_level, $children )
| Parameters: (2) |
|
| Returns: |
|
| Defined at: |
|
| Codex: |
Outputs nested array of pages
Source
function block_core_page_list_nest_pages( $current_level, $children ) {
if ( empty( $current_level ) ) {
return;
}
foreach ( (array) $current_level as $key => $current ) {
if ( isset( $children[ $key ] ) ) {
$current_level[ $key ]['children'] = block_core_page_list_nest_pages( $children[ $key ], $children );
}
}
return $current_level;
}