Pages final class
Minn\Runtime\Pages · public/minn/src/Minn/Runtime/Pages.php · 136 lines
get_pages() as the reference shapes it: its arguments as a post query (WP_Query, so its filters shape it), the tree order of the result, then the get_pages filter. wp_list_pages, wp_dropdown_pages and the navigation's page list take their pages from here.
Constants and properties
| const | DEFAULTS = array ( 'child_of' => 0, 'sort_order' => 'ASC', 'sort_column' => 'post_title', 'hierarchical' => 1, 'exclude' => array ( ), 'include' => array ( ), 'meta_key' => '', 'meta_value' => '', 'authors' => '', 'parent' => -1, 'exclude_tree' => array ( ), 'number' => '', 'offset' => 0, 'post_type' => 'page', 'post_status' => 'publish', ) | |
| private | COLUMNS = array ( 'post_title' => 'title', 'menu_order' => 'menu_order', 'post_date' => 'date', 'post_modified' => 'modified', 'ID' => 'ID', 'post_author' => 'author', 'post_name' => 'name', 'post_parent' => 'parent', ) |
Public
| static | get(array $args): array# | The pages get_pages() answers for parsed arguments.
@return array<int, \WP_Post> | ||||||
| static | queryArgs(array $parsed, array $include, array $exclude): array# | The post query the get_pages() arguments amount to, shaped as the reference hands it to get_pages_query_args (probe filter-inputs-2): the order by the columns as named, then (unless pages are picked by id) the excluded ones and the meta pair, the number or -1 and the offset, the type, the statuses as a list and the cache flags; then the picked pages, the authors and the parent, each when given.
| ||||||
| static | arrange(array $pages, array $parsed): array# | The pages as the reference leaves them: with a hierarchy (unless a parent is named or pages are picked by id) or a child_of, only what descends from that page (the root by default), each parent followed by its subtree; then any branch left out, its places left empty.
@return array<int, object> | ||||||
| static | children(array $pages, int $parent): array# | What descends from a page within the list, depth first, siblings in list order (get_page_children); a page whose parent is not reached is left out.
@return list<object> | ||||||
| static | descendants(array $pages, int $parent): array# | Every page under one ancestor, in list order. @param list<object> $pages @return list<object>
|
Nothing matches.