BlockDirectoryController final readonly class
Minn\Rest\BlockDirectoryController · public/minn/src/Minn/Rest/BlockDirectoryController.php · 72 lines
wp/v2/block-directory/search (Austin, 2026-10-21, decision 1B): the directory's block plugins for a term, asked as plugins_api asks (its filters run) of wordpress.org through the Minn update service. The term is required before the caller is judged; then only someone who may install and activate plugins searches. A plugin with blocks is one item, named for its first block: its short description as the directory words it, ratings out of five, the author's name without its link, the last update as a date and as how long ago, and a link to install it.
Constants and properties
| private | REFUSAL = 'Sorry, you are not allowed to browse the block directory.' | |
| private | ARGS = array ( 'context' => array ( 'description' => 'Scope under which the request is made; determines fields present in response.', 'type' => 'string', 'enum' => array ( 0 => 'view', ), 'default' => 'view', 'required' => false, ), 'page' => array ( 'description' => 'Current page of the collection.', 'type' => 'integer', 'default' => 1, 'minimum' => 1, 'required' => false, ), 'per_page' => array ( 'description' => 'Maximum number of items to be returned in result set.', 'type' => 'integer', 'default' => 10, 'minimum' => 1, 'maximum' => 100, 'required' => false, ), 'term' => array ( 'description' => 'Limit result set to blocks matching the search term.', 'type' => 'string', 'minLength' => 1, 'required' => true, ), ) | |
| private | readonly Minn\Rest\RestUrl $url | Promoted from the constructor. |
Public
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | item(array $plugin, array $block): array# | One plugin as the search shows it.
@return array<string, mixed> |
Nothing matches.