2020-05-01 / 4848阅 / 悠然
Order the pages with children under parents in a flat list.
It uses auxiliary structure to hold parent-children relationships and runs in O(N) complexity
(WP_Post[])
(Required)
Posts array (passed by reference).
(int)
(Optional)
Parent page ID. Default 0.
(string[]) Array of post names keyed by ID and arranged by hierarchy. Children immediately follow their parents.