WPDev.one
Core Function
View Source on Trac ↗

unregister_meta_key()

unregister_meta_key( mixed $object_type, mixed $meta_key, mixed $object_subtype = '' )

Unregisters a meta key from the list of registered keys.

Parameters 2 required

Name / Type Description
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
$meta_key
string

Metadata key.

Required
$object_subtype
string

Optional. The subtype of the object type. Default empty string.

Return Value

(bool)
True if successful. False if the meta key was not registered.

Function Information

Since Version
4.6.0
Source File
wp-includes/meta.php
Advertisement