wp_insert_post_data filter hook identify current action
Not sure, but seems maybe $data[‘post_status’] would be set to ‘trash’ at that point. If so, then you could just do something like… if ($data[‘post_status’] == ‘trash’) { return $data; } …before the other manipulations. EDIT That code should work then – but needs to be at top of the function, like… public function updatetitle($data) … Read more