Is there a For/Loop available to display all the available WordPress User Custom Meta Data so that when on the user.edit.php screen you can see and update all custom metadata? I understand methods exist on a per item basis.
1 comment
Comments are closed.
Two ways I can think of:
you could use a MySQL statement to get all usermeta matching an ID in the wp_usermeta table. That would get the custom meta as well, but it would also get other user settings that I don’t think you want.
The other way is to define an array with all your custom data and loop through the array with a FOR loop.
For example:
I might be wrong, but I don’t think there’s a relationship in the WP db that defines whether a metadata is custom or not. So that’s why you need to build the array beforehand.