Added plugin hook for pageBeforeRemove event