API / Minn\Rest / DeclaredTermsController

DeclaredTermsController final readonly class

Minn\Rest\DeclaredTermsController · public/minn/src/Minn/Rest/DeclaredTermsController.php · 43 lines

wp/v2/{rest_base} for the taxonomies plugin code registers to show in REST (probe rest-plugin-types), answered as the core taxonomies are. Registered after the declared post types; a base no such taxonomy names declines, so a plugin's own route under wp/v2 is not shadowed.

Used by 1

Constants and properties

privatereadonly Minn\Rest\TermsController $terms

Promoted from the constructor.

Public

new__construct(Minn\Rest\TermsController $terms)#
methodlist(Minn\Http\Request $request, string $base): Minn\Http\ResponseGET /wp/v2/{base:[a-z0-9_-]+} (registered taxonomy {base})#

A registered taxonomy's terms.

methodsingle(Minn\Http\Request $request, string $base, string $id): Minn\Http\ResponseGET /wp/v2/{base:[a-z0-9_-]+}/{id:[\d]+} (registered taxonomy {base})#

One term of a registered taxonomy.

methodcreate(Minn\Http\Request $request, string $base): Minn\Http\ResponsePOST /wp/v2/{base:[a-z0-9_-]+} (registered taxonomy {base})#

Creates a term in a registered taxonomy.

methodupdate(Minn\Http\Request $request, string $base, string $id): Minn\Http\ResponsePOST /wp/v2/{base:[a-z0-9_-]+}/{id:[\d]+} (registered taxonomy {base})PUT /wp/v2/{base:[a-z0-9_-]+}/{id:[\d]+} (registered taxonomy {base})PATCH /wp/v2/{base:[a-z0-9_-]+}/{id:[\d]+} (registered taxonomy {base})#

Updates a term of a registered taxonomy.

methoddelete(Minn\Http\Request $request, string $base, string $id): Minn\Http\ResponseDELETE /wp/v2/{base:[a-z0-9_-]+}/{id:[\d]+} (registered taxonomy {base})#

Deletes a term of a registered taxonomy.