Missing ‘Move to Trash’ option from bulk select box
I would imagine that your role does not have the capability to delete posts. Maybe try installing a Members plugin and take a look.
I would imagine that your role does not have the capability to delete posts. Maybe try installing a Members plugin and take a look.
Sort trash by date post was trashed
It’s possible to utilize the pre_delete_post filter to short-circuit the deleting of posts. add_filter( ‘pre_delete_post’, ‘wpse_224246_pre_delete_post’, 10, 3 ); function wpse_224246_pre_delete_post( $delete, $post, $force_delete ) { //* Escape early if post isn’t already trashed if( ‘trash’ !== $post->post_status ) { return $delete; } //* Go ahead with deleting the post if the current user is … Read more
posts comments goes to trash
How can Reusable Blocks be fully deleted?
The Core “trash post” links in the “Quick Edit” section on edit.php and in the “advanced” form in the “Publish” meta box work over GET not POST. Unless you have altered the form(s) somehow, there is no POST data. All you have is the post ID. To save data when a post is deleted, you … Read more
Following is the reformatted version of your code. get_delete_post_link() is used for fetching delete post URL so that we dont have to worry about nonce stuff. global $post is kept to avoid PHP notice which is currently there in your code. Please check it. function wpso_delete_my_posts() { global $post; ob_start(); if ( current_user_can(‘delete_posts’, $post->ID ) … Read more
You could build an action for delete_comment, where you loop through the childcomments and delete them. I use two different functions here, one that trashes the childcomments (hooked into trash_comment), and one that deletes them directly. Please make sure which funtion you use, or if you want to use both. The safe version would be … Read more
In vanilla WordPress the only difference is that trashed comments get deleted automatically after (customizable) time span. Adding plugins to the picture – it might make difference to what/how specific plugin learns from incoming spam.
Well, this is partly true and partly false. When you trash a post, everything that is tied to it is also trashed. This means, if you untrash the post, the comments etc. are untrashed as well. However, comments and other stuff is not handled as if they were trashed directly (i.e., on the Comments page … Read more