regex for routes
-
Hi, quick question.
from the docs at
https://wp-api.org/guides/extending.html#creating-your-endpoints“The data passed in and returned by the json_endpoints filter should be in the format of an array containing a map of route regular expression to endpoint lists.”
e.g.
routes[‘regex expression’] = array(
// stuff
);I want to create a custom route on
/wp-json/posts?type=plots
for POSTing new ‘plots’ (they are for a map project)
what should the regex expression be in this case?
many thanks.
James
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘regex for routes’ is closed to new replies.