sanitize_user_field


sanitize_user_field ( $field, $value, $user_id, $context )

Parameters:
  • (string) $field The user Object field name.
  • (mixed) $value The user Object value.
  • (int) $user_id User ID.
  • (string) $context How to sanitize user fields. Looks for 'raw', 'edit', 'db', 'display', 'attribute' and 'js'.
Returns:
  • (mixed) Sanitized value.
Defined at:

Description

Sanitize user field based on context.

Possible context values are: 'raw', 'edit', 'db', 'display', 'attribute' and 'js'. The 'display' context is used by default. 'attribute' and 'js' contexts are treated like 'display' when calling filters.

Related Functions

sanitize_term_field, sanitize_text_field, sanitize_post_field, sanitize_user, sanitize_textarea_field

Top Google Results

User discussions

wpseek mobile