Short-circuits deleting metadata of a specific type by meta ID.
Description
The dynamic portion of the hook name, $meta_type, refers to the meta object type (blog, 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: <ul> <li>delete_blog_metadata_by_mid</li> <li>delete_post_metadata_by_mid</li> <li>delete_comment_metadata_by_mid</li> <li>delete_term_metadata_by_mid</li> <li>delete_user_metadata_by_mid</li> </ul>
Parameters
$deletenull|bool
Whether to allow metadata deletion of the given type.
1049*1050* @since 5.0.01051*1052* @param null|bool$delete Whether to allow metadata deletion of the given type.1053* @param int$meta_id Meta ID.1054*/1055$check=apply_filters("delete_{$meta_type}_metadata_by_mid",null,$meta_id);1056if(null!==$check){1057return(bool)$check;1058}10591060// Fetch the meta and go on if it's found.1061$meta=get_metadata_by_mid($meta_type,$meta_id);
History
Introduced in 5.0.0. Unchanged from 6.7.7 through 7.1.0.