wpseek.com
WordPress开发者和主题制作者的搜索引擎
block_core_page_list_nest_pages › WordPress Function
Sincen/a
已弃用n/a
› block_core_page_list_nest_pages ( $current_level, $children )
参数: (2) |
|
返回: |
|
定义在: |
|
文档: |
Outputs nested array of pages
源码
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; }