I have a custom type called activities, and I'm wandering how can I manipulate the data that this route
/v2/activities/5837
returns?
It's a route generated by the plugin, and it returns the activity with id = 5837. What I want to do is prevent returning a parameter in the acf array if the user is not admin. Namely, I don't want to show the participants.
I presume I need to put some sort of filter somewhere. Any help would be much appreciated.
Hi guys, WP newbie here.
I have a custom type called activities, and I'm wandering how can I manipulate the data that this route /v2/activities/5837 returns?
It's a route generated by the plugin, and it returns the activity with id = 5837. What I want to do is prevent returning a parameter in the acf array if the user is not admin. Namely, I don't want to show the participants.
I presume I need to put some sort of filter somewhere. Any help would be much appreciated.