Run Jquery Script after delete post in front end
Run Jquery Script after delete post in front end
Run Jquery Script after delete post in front end
I think you’re looking for this… wp.getPosts({ status: ‘trash’, }, [‘title’,’status’], function( err, data ) { console.log( data ); } });
I think the only way is to Change it’s translation. From ‘Trash’ to ‘Archive’. But this can have side-effects. As I searched in the core file (modifying core-files is ALWAYS a BAD idea!!) there where no filter called, wich you coul hook into to Bypass…
You can use transition_post_status: add_action(‘transition_post_status’, ‘wpse_handle_untrash’); function wpse_handle_untrash($new_status, $old_status, $post) { // if the post was in the trash, but now is not if($old_status == ‘trash’) { // if you want, you can do something only for a certain post type if($post->post_type == ‘my-desired-post-type’) { // do something echo ‘<script>alert(‘ . $post->ID . ‘);</script>’; } … Read more
WordPress deletes custom posts instead of trash them
Bulk trashing post ‘fails’
Set “move to trash” as the default bulk action
is possible to interupt a post deletion when empty the trash
How to display “Trash” in my custom post type?
Prevent users to delete comments from trash