Changing a post status name

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…

How can i take all ids from untrash_post action?

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