deleteDraftPost( )


Moves a draft post with the provided ID to the trash bin. A published post can also be deleted by its provided draftPostId.

The optional permanent field enables you to delete a post permanently, bypassing the trash bin. When a draft post is deleted this way, it can't be restored.

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Manage Blog
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
draftPostIdstringRequired

Draft post ID.


optionsDeleteDraftPostOptions

Options for deleting a draft post.

Was this helpful?
Yes
No