Added before and after post/page generation hook methods.