add event before to theme config