Code example written for http://pablovallejo.me/debugging-wp-ajax/