Add new delegate into contentPublish

For #1712, adds a new delegate to allow alteration of any SQL where and join statements prior to entries being fetched.