Core Function
View Source on Trac ↗ sanitize_meta()
sanitize_meta(
mixed $meta_key,
mixed $meta_value,
mixed $object_type,
mixed $object_subtype = ''
) Sanitizes meta value.
Parameters 3 required
| Name / Type | Description |
|---|---|
| $meta_key string | Metadata key. Required |
| $meta_value mixed | Metadata value to sanitize. Required |
| string | $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', or any other object type with an associated meta table. Required |
| $object_subtype string | Optional. The subtype of the object type. Default empty string. |
Return Value
(mixed)
Sanitized $meta_value.
Function Information
Since Version
3.1.3
Source File
wp-includes/meta.php
Advertisement