GET
/wp-json/mmwp/v1/public/version
Namespace mmwp/v1, route /public/version
Permission: Public: no authentication.
Registered in src/Api/PublicRestController.php#L72(opens in a new tab).
Read from the source of admin-terms-acceptance at main. Entries marked wp-kit are declared once as an operation and exposed on REST, WP-CLI and as an Ability.
GET
Namespace mmwp/v1, route /public/version
Permission: Public: no authentication.
Registered in src/Api/PublicRestController.php#L72(opens in a new tab).
GET
Namespace mmwp/v1, route /public/versions
Permission: Public: no authentication.
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
per_page | integer | 20 | Min 1. Max 100. | |
offset | integer | 0 | Min 0. |
Registered in src/Api/PublicRestController.php#L82(opens in a new tab).
GET
Namespace mmwp/v1, route /public/versions/(?P<id>\d+)
Permission: Public: no authentication.
Registered in src/Api/PublicRestController.php#L105(opens in a new tab).
GET · wp-kit
Namespace mmwp/v1, route /terms/version
Show the active terms version
Returns the terms version users must currently have accepted.
Permission: Capability: edit_posts.
Registered in src/Api/TermsResource.php#L1(opens in a new tab).
GET · wp-kit
Namespace mmwp/v1, route /terms/versions
List archived terms versions
Lists every archived terms version, newest first.
Permission: Capability: edit_posts.
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
limit | integer | 20 | Rows to return. Min 1. Max 100. | |
offset | integer | 0 | Rows to skip. Min 0. |
Registered in src/Api/TermsResource.php#L1(opens in a new tab).
GET · wp-kit
Namespace mmwp/v1, route /terms/versions/(?P<id>\d+)
Get one archived terms version
Returns one archived terms version, including its full text.
Permission: Capability: edit_posts.
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
id | integer | Yes | Version ID. Min 1. |
Registered in src/Api/TermsResource.php#L1(opens in a new tab).
POST · wp-kit
Namespace mmwp/v1, route /terms/version
Publish a new terms version
Publishes the text as the active version. Everyone in scope is asked to accept it again.
Permission: Set by the resource default (not overridden on this operation).
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
content | string | Yes | The terms text. HTML is filtered through wp_kses_post(). | |
version_number | string | Human version number, e.g. 2.1. Derived if omitted. | ||
effective_date | string | Effective date, Y-m-d. | ||
change_summary | string | Shown to returning users above the terms. | ||
only_if_changed | boolean | false | Do nothing if the text matches the active version. |
Registered in src/Api/TermsResource.php#L1(opens in a new tab).
POST · wp-kit
Namespace mmwp/v1, route /terms/refresh
Re-read the terms content source
Re-reads the terms content source now instead of waiting for the daily check, and publishes a new version if it changed.
Permission: Set by the resource default (not overridden on this operation).
Registered in src/Api/TermsResource.php#L1(opens in a new tab).
GET · wp-kit
Namespace mmwp/v1, route /terms/acceptances
List acceptance log entries
Read-only, redacted export of the acceptance log. Restricted to the plugin managers.
Permission: Callback can_read_log().
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
user_id | integer | 0 | Only this user. 0 for everyone. Min 0. | |
version_id | integer | 0 | Only this terms version. 0 for all. Min 0. | |
date_from | string | First day, Y-m-d (UTC). | ||
date_to | string | Last day, Y-m-d (UTC). | ||
limit | integer | 50 | Rows to return. Min 1. Max 500. | |
offset | integer | 0 | Rows to skip. Min 0. |
Registered in src/Api/TermsResource.php#L1(opens in a new tab).
Registered with the WordPress Abilities API (wp_register_ability()).
Read-only · wp-kit
Show the active terms version
Returns the terms version users must currently have accepted.
Registered in src/Api/TermsResource.php#L1(opens in a new tab).
Read-only · wp-kit
List archived terms versions
Lists every archived terms version, newest first.
Input: limit, offset
Registered in src/Api/TermsResource.php#L1(opens in a new tab).
Read-only · wp-kit
Get one archived terms version
Returns one archived terms version, including its full text.
Input: id
Registered in src/Api/TermsResource.php#L1(opens in a new tab).
Writes · wp-kit
Publish a new terms version
Publishes the text as the active version. Everyone in scope is asked to accept it again.
Input: content, version_number, effective_date, change_summary, only_if_changed
Registered in src/Api/TermsResource.php#L1(opens in a new tab).
Writes · wp-kit
Re-read the terms content source
Re-reads the terms content source now instead of waiting for the daily check, and publishes a new version if it changed.
Registered in src/Api/TermsResource.php#L1(opens in a new tab).
Read-only · wp-kit
List acceptance log entries
Read-only, redacted export of the acceptance log. Restricted to the plugin managers.
Input: user_id, version_id, date_from, date_to, limit, offset
Registered in src/Api/TermsResource.php#L1(opens in a new tab).