delete_post_meta_by_key( string $post_meta_key ): bool
- Since
- 2.3.0
- Source
wp-includes/post.php:2659
Deletes everything from post meta matching the given meta key.
Parameters
$post_meta_keystring- Key to search for when deleting.
Return
bool- Whether the post meta key was deleted from the database.
Uses · 1
- delete_metadata()Deletes metadata for the specified object.
Used by · 1
- upgrade_460()Executes changes made in WordPress 4.6.0.
Source
function delete_post_meta_by_key( $post_meta_key ) { return delete_metadata( 'post', null, $post_meta_key, '', true );}History
Introduced in 2.3.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, from
src/wp-includes/post.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.