update_comment_metadata_by_mid filter-hookWP 5.0.0

Short-circuits updating metadata of a specific type by meta ID.

This is one of the variants of the dynamic hook update_(meta_type)_metadata_by_mid

Usage

add_filter( 'update_comment_metadata_by_mid', 'wp_kama_update_comment_metadata_by_mid_filter', 10, 4 );

/**
 * Function for `update_comment_metadata_by_mid` filter-hook.
 * 
 * @param null|bool    $check      Whether to allow updating metadata for the given type.
 * @param int          $meta_id    Meta ID.
 * @param mixed        $meta_value Meta value. Must be serializable if non-scalar.
 * @param string|false $meta_key   Meta key, if provided.
 *
 * @return null|bool
 */
function wp_kama_update_comment_metadata_by_mid_filter( $check, $meta_id, $meta_value, $meta_key ){

	// filter...
	return $check;
}
$check(null|true|false)
Whether to allow updating metadata for the given type.
$meta_id(int)
Meta ID.
$meta_value(mixed)
Meta value. Must be serializable if non-scalar.
$meta_key(string|false)
Meta key, if provided.

Changelog

Since 5.0.0 Introduced.

Where the hook is called

update_metadata_by_mid()
update_comment_metadata_by_mid
wp-includes/meta.php 902
$check = apply_filters( "update_{$meta_type}_metadata_by_mid", null, $meta_id, $meta_value, $meta_key );

Where the hook is used in WordPress

Usage not found.