Adds #beforePublish and #afterPublish triggers to Content.