WordPress: Create a REST API endpoint