GB_User::add_meta
Add meta data field to a user.
Post meta data is called "Custom Fields" on the Administration Screens.
Signature
public function add_meta(int
$user_id,
string
$meta_key,
mixed
$meta_value,
[boolean
$unique = false] )
Parameters
$user_id
— int
User ID.$meta_key
— string
Metadata name.$meta_value
— mixed
Metadata value.$unique
— boolean
Optional, default is false. Whether the same key should not be added.
Returns
- int|bool
- Meta ID on success, false on failure.
Violations
Checkstyle
Line | Column | Severity | Message |
---|---|---|---|
735 | 12 | error | Method name "GB_User::add_meta" is not in camel caps format |
735 | 12 | error | Visibility must be declared on method "add_meta" |