Skip to content

Instantly share code, notes, and snippets.

View harrisoncparker's full-sized avatar
🐙

Harrison Parker harrisoncparker

🐙
View GitHub Profile
@harrisoncparker
harrisoncparker / WP_Endpoint.php
Last active February 4, 2019 15:36
Very simple single class for creating custom endpoint in vanilla wordpress. Based on this stackoverflow answer: https://stackoverflow.com/questions/38901536/wordpress-map-custom-url-to-a-function Not intended to be a full solution.
<?php
/**
* @author Harrison Parker
* @github https://github.com/harrisoncparker
*/
class WP_Endpoint
{
private $route;
private $callable;