I've updated the patch and added code to actually invoke the pre-add and post-add plugins if defined.