Short-circuits adding metadata of a specific type.
The dynamic portion of the hook name, $meta_type, refers to the meta object type (post, comment, term, user, or any other type with an associated meta table).
Returning a non-null value will effectively short-circuit the function.
Possible hook names include:
add_post_metadataadd_comment_metadataadd_term_metadataadd_user_metadata$checknull|bool
$object_idint
$meta_keystring
$meta_valuemixed
$uniquebool
$check = apply_filters( "add_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $unique );
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/add_meta_type_metadata