Short-circuits updating 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:
update_post_metadataupdate_comment_metadataupdate_term_metadataupdate_user_metadata$checknull|bool
$object_idint
$meta_keystring
$meta_valuemixed
$prev_valuemixed
$meta_type, refers to the meta object type. For example, if a ‘user’ metadata gets updated, the hook would be ‘update_user_metadata‘.null value (the value of $check) if the data is be saved to the database. If it returns anything else, the ‘update_metadata‘ function (and therefore the ‘update_{$meta_type}_metadata‘ filter) will return what the filter callbacks return.$check = apply_filters( "update_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $prev_value );
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/update_meta_type_metadata