and it builds fine. Not sure about functionality as I have never used the plugin and I have no idea what to test for.
The register_editable_user_custom_field method signature is a field name and an optional flag to mark it as staff_only, so as far as I can tell, passing an array to it is unexpected?
I’m trying to create a custom user field from a plugin but I’m not sure I fully understand what you’re describing here. In my plugin if I do:
register_editable_user_custom_field 'foo'
Should I still use plugin outlets connectors to display it on the user profile and the user card?
Or is there a mechanism like the custom field in the admin that can add it automatically (including in the users directory)? I want to avoid adding connector and serializer field if there is already a way to do this.
Hello @merefield, thanks for the link but it’s not what I’m asking. Looks like it’s to make custom field created in the admin non-visible except with a staff API key.
If I am unclear, let me reformulate: is there a way to register a custom user field with a plugin, just like we can do within the admins “User Fields” (editable, searchable, shown on user profile, on user card, etc)?