copy-post Copy post(s) to draftDuplicates one or more posts, pages, or CPTs as new drafts, copying core fields, meta, and taxonomy terms. Per item, an opaque custom_overrides object can be supplied; it is forwarded as-is to the lh_copy_to_draft_after_duplicate_post action for consumption by other plugins (e.g. an events plugin restoring a date on the copy from its own table). This ability never inspects or acts on custom_overrides itself. Requires edit_posts, and edit rights on each post copied. Pass site_id to act on another site you belong to.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
items | array of object | Yes | One entry per post to copy. | |
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. |