get-lock Get Locklist-locked List Locked Postsset-lock Set LockReturns the lock state of one post, and whether the calling account can edit it and can lock it. It gives whether the post type is lockable, whether the post is locked, and who locked it and when (GMT). Read-only. Requires read_post on the post. Pass site_id to act on another site you belong to.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
post_id | integer | Yes | ID of the post on the current site. | |
site_id | integer | No | Optional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site. |
Lists the locked posts on the current site, most recently modified first, with paging. It covers every status except auto-draft, optionally only one lockable post type. Each item gives the post ID, type, status, title, who locked it and when (GMT). Read-only. Requires manage_options. Pass site_id to act on another site you belong to.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
post_type | string | No | "" | Only this post type. Must be lockable. Default: every lockable type. |
page | integer | No | 1 | Page of results, from 1. Default 1. |
per_page | integer | No | 20 | Posts per page, 1 to 100. Default 20. |
site_id | integer | No | Optional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site. |
Locks or unlocks one post on the current site. A locked post cannot be edited, trashed or deleted by any account without the lock capability, by any route that goes through the WordPress APIs. Uses the same storage as the editor checkbox, so the post_locked and post_unlocked actions fire and the change is attributed to the calling account. Refuses post types that cannot be locked. Setting the state a post already has changes nothing and reports changed false. Requires manage_options. Pass site_id to act on another site you belong to.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
post_id | integer | Yes | ID of the post on the current site. | |
locked | boolean | Yes | true to lock, false to unlock. | |
task_id | integer | No | Optional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it. | |
claim_token | string | No | Optional. The claim_token from claim-next-task for task_id. Required when task_id is given. | |
site_id | integer | No | Optional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site. |