delete_post_meta_by_key( string $post_meta_key ): bool

Deletes everything from post meta matching the given meta key.


Parameters

$post_meta_key string Required
Key to search for when deleting.

Top ↑

Return

bool Whether the post meta key was deleted from the database.


Top ↑

Source

File: wp-includes/post.php. View all references

function delete_post_meta_by_key( $post_meta_key ) {
	return delete_metadata( 'post', null, $post_meta_key, '', true );
}


Top ↑

Changelog

Changelog
Version Description
2.3.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.