post_status ) { return; } $settings = $this->settings->get(); if ( ! $settings->is_translatable_type( $post->post_type ) ) { return; } if ( null === $this->translations->find( $post_id ) ) { $this->translations->assign( $post_id, $settings->default_code() ); } } public function on_delete( int $post_id ): void { $this->translations->delete( $post_id ); } }