Short-circuits the return value of a meta field.
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 filter names include:
get_post_metadataget_comment_metadataget_term_metadataget_user_metadata$valuemixed
$single. Default null.$object_idint
$meta_keystring
$singlebool
$meta_key.$meta_typestring
'post', 'comment', 'term', 'user', or any other object type with an associated meta table.The filter must return null if the data should be taken from the database. If it returns anything else, the get_metadata() function (and therefore the get_user_meta) will return what the filter returns.
$check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, $single, $meta_type );
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_meta_type_metadata