BlockQueries final class
Minn\Runtime\BlockQueries · public/minn/src/Minn/Runtime/BlockQueries.php · 62 lines
The query arguments the query and comments blocks run, as WordPress's block functions build them from a block's context: a query block's post query, and the comment query a post's comments block shows.
Constants and properties
| private | FORMATS = array ( 0 => 'standard', 1 => 'aside', 2 => 'chat', 3 => 'gallery', 4 => 'link', 5 => 'image', 6 => 'quote', 7 => 'status', 8 => 'video', 9 => 'audio', ) | The post formats a query block may ask for, by slug. |
Public
| static | posts(mixed $block, mixed $page): mixed# | A query block's post query for a page (build_query_vars_from_query_block), through query_loop_block_query_vars when the block has a query context. @return array<string, mixed> |
| static | comments(mixed $block): array# | The comment query a comments block shows (build_comment_query_vars_from_block): approved comments oldest first, the reader's own held ones too, the post's, threaded and paged as the discussion settings say. @return array<string, mixed> |
Nothing matches.