https://technosailor.com/2012/09/10/tutorial-building-custom-rewrite-endpoints-in-wordpress/