delete_comment_metadata_by_mid filter-hookWP 5.0.0

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

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

Usage

add_filter( 'delete_comment_metadata_by_mid', 'wp_kama_delete_comment_metadata_by_mid_filter', 10, 2 );

/**
 * Function for `delete_comment_metadata_by_mid` filter-hook.
 * 
 * @param null|bool $delete  Whether to allow metadata deletion of the given type.
 * @param int       $meta_id Meta ID.
 *
 * @return null|bool
 */
function wp_kama_delete_comment_metadata_by_mid_filter( $delete, $meta_id ){

	// filter...
	return $delete;
}
$delete(null|true|false)
Whether to allow metadata deletion of the given type.
$meta_id(int)
Meta ID.

Changelog

Since 5.0.0 Introduced.

Where the hook is called

delete_metadata_by_mid()
delete_comment_metadata_by_mid
wp-includes/meta.php 1020
$check = apply_filters( "delete_{$meta_type}_metadata_by_mid", null, $meta_id );

Where the hook is used in WordPress

Usage not found.