Wordpress events handler.