REST API register new fields for specific users
-
Hi there,
I’m trying to register some new REST fields for users basing on their role.
At the moment I’m using the register_rest_field() function, but it allows only to add a field to all the user.
Is it possible to register a field only to users with a specific role?E.g.
I want that users with admin role have a field that contributors have not.Thanks for the help!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘REST API register new fields for specific users’ is closed to new replies.