whitelisting rest api endpoints via filter hook
-
In the faq I’m trying to follow the suggestion in “How do I whitelist other REST API endpoint? (via filter hook)”.
I see a call to
add_filterwhere should I place this? in functions.php?Is
allow_my_endpointsdefined somewhere?And the anonymous function
function ($allowed_endpoints ) { $allowed_endpoints[] = '/my-endpoint'; return $allowed_endpoints; };how should this interact with the filter hook?
(also the example seems to be invalid php, the anonymous function lacks a trailing semicolon, small things like this set beginners back a lot of time.)
- This topic was modified 7 years, 8 months ago by .
- This topic was modified 7 years, 8 months ago by .
The page I need help with: [log in to see the link]
The topic ‘whitelisting rest api endpoints via filter hook’ is closed to new replies.