sanitize_meta

SummerySummery

Sanitizes meta value.

Syntax

sanitize_meta( string $meta_key, mixed $meta_value, string $object_type, string $object_subtype = '' )

ParametersParameters

$meta_key

(string) (Required) Metadata key.

$meta_value

(mixed) (Required) Metadata value to sanitize.

$object_type

(string) (Required) Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', or any other object type with an associated meta table.

$object_subtype

(string) (Optional) The subtype of the object type.

Default value: ''

ReturnReturn

(mixed) Sanitized $meta_value.

SourceSource

File: wp-includes/meta.php


			

ChangelogChangelog

Changelog
Version Description
4.9.8 The $object_subtype parameter was added.
3.1.3 Introduced.
Scroll to Top