WordPress at a glance
filter is not described

get_(meta_type)_metadata_by_mid filter-hook . WP 5.0.0

Short-circuits the return value when fetching a meta field by meta ID.

The dynamic portion of the hook, $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.

Usage

add_filter( 'get_(meta_type)_metadata_by_mid', 'filter_function_name_8796', 10, 2 );
function filter_function_name_8796( $value, $meta_id ){
	// filter...

	return $value;
}
$value(stdClass/null)
The value to return.
$meta_id(int)
Meta ID.

Список изменений

С версии 5.0.0 Введена.

Где вызывается хук

get_metadata_by_mid()
get_(meta_type)_metadata_by_mid
wp-includes/meta.php 747
$check = apply_filters( "get_{$meta_type}_metadata_by_mid", null, $meta_id );

Где используется хук в ядре WordPress

wp-includes/default-filters.php 114
add_filter( 'get_term_metadata_by_mid', 'wp_check_term_meta_support_prefilter' );
wp-includes/ms-default-filters.php 65
add_filter( 'get_blog_metadata_by_mid', 'wp_check_site_meta_support_prefilter' );