Uma área de pesquisa sobre o WordPress para devs e autores do tema



delete_post_meta_by_key ›

Desde2.3.0
Obsoleton/a
delete_post_meta_by_key ( $post_meta_key )
Parâmetros:
  • (string) $post_meta_key Key to search for when deleting.
    Required: Yes
Retorna:
  • (bool) Whether the post meta key was deleted from the database.
Definido em:
Codex:

Deletes everything from post meta matching the given meta key.



Fonte

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