delete_post
This endpoint will allow you to delete posts. Provide `post_media` var – to delete all previously attached images from post, pass value ‘delete`.
`nonce` requirement can be disabled from Settings > UserPlus. Admin notification for any new submitted posts can also be enabled/disabled from Settings > UserPlus.
Note: User must have capability to delete post. Change user role if needed. Only author of post or admin can delete it.
Resource URL
http://localhost/api/userplus/delete_post/
Method
POST
Required Parameters
- cookie - for user authentication
- post_id – post ID to delete
- nonce - available from the get_nonce method (call with vars controller=userplus and method=delete_post)
- key – get API key from Settings > User Plus
Optional Parameters
- post_media – to delete all previously attached images from post, pass value ‘delete’
- force_delete – if set to ‘true’, it will delete the post bypassing the WordPress trash.
Sample Request URL
http://localhost/api/userplus/delete_post/