Uses
Uses | Description |
---|---|
wp-includes/meta.php: delete_metadata() | Deletes metadata for the specified object. |
Deletes everything from post meta matching the given meta key.
(string) (Required) Key to search for when deleting.
(bool) Whether the post meta key was deleted from the database.
File: wp-includes/post.php
function delete_post_meta_by_key( $post_meta_key ) { return delete_metadata( 'post', null, $post_meta_key, '', true ); }
Version | Description |
---|---|
2.3.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/delete_post_meta_by_key