delete_meta() WordPress Function
The delete_meta() function is used to delete a custom field from a post. This function takes two arguments: the post ID and the meta key. The post ID is the ID of the post from which you want to delete the custom field. The meta key is the key of the custom field you want to delete.
delete_meta( int $mid ) #
Deletes post meta data by meta ID.
Parameters
- $mid
(int)(Required)
Return
(bool)
Source
File: wp-admin/includes/post.php
function delete_meta( $mid ) { return delete_metadata_by_mid( 'post', $mid ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
1.2.0 | Introduced. |