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_filter
where should I place this? in functions.php?Is
allow_my_endpoints
defined 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.)
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.