The plugin registers three read-only routes in the prc-api/v3 namespace. Requests use the WordPress REST base path: /wp-json/prc-api/v3/.
Route index
| Method | Route | Access | Purpose |
|---|---|---|---|
GET | /blocks/taxonomy-search | Public | Search taxonomy terms |
GET | /blocks/taxonomy-index-az-list | Requires the read capability | List terms whose names start with a letter |
GET | /render-to-regions | Public | List configured render regions for a post or template |
Search taxonomy terms
GET /wp-json/prc-api/v3/blocks/taxonomy-search
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
taxonomy | string | No | — | Taxonomy slug passed to get_terms() |
search | string | No | — | Term-name search text |
parent_term_id | string | No | — | Limits results to children of this term ID |
per_page | integer | No | 25 | Positive result limit |
The route returns WordPress term objects. Each result also includes link and a plain-text description. Results are cached for one day by query arguments.
The route is public. Callers must use only taxonomies and result data that are safe to expose.
Source: src/taxonomy-search/class-taxonomy-search.php
List terms by letter
GET /wp-json/prc-api/v3/blocks/taxonomy-index-az-list
| Parameter | Type | Required | Description |
|---|---|---|---|
taxonomy | string | No | Comma-separated taxonomy slugs |
letter | string | No | Prefix used to filter term names |
The callback returns matching WP_Term objects. It returns false when the taxonomy or letter is empty, or when no terms match. The route requires a user who has the read capability.
The implementation first queries with name__like, then removes terms whose names do not start with the requested letter. Results use the prc-block-library object-cache group.
Source: src/taxonomy-index-az-list/class-taxonomy-index-az-list.php
List render regions
GET /wp-json/prc-api/v3/render-to-regions
| Parameter | Type | Required | Description |
|---|---|---|---|
post | integer | No | Resolve regions from the post's _wp_template meta; falls back to single |
template | string | No | Resolve regions for this template name |
When both parameters are present, post takes precedence. The route returns an array of region-name strings. It returns null when neither parameter is present.
The route is public. Region configuration comes from the plugin's prc_block__render_to_regions option.
Source: src/render-to-region/class-render-to-region.php