delete_meta

Delete post meta data by meta ID.

Description

delete_meta( (int) $mid ); 

Parameters (1)

0. $mid (int)
The mid.

Usage

  1. if ( !function_exists( 'delete_meta' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/post.php'; 
  3.  
  4. // The mid. 
  5. $mid = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = delete_meta($mid); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/post.php  
  1. function delete_meta( $mid ) { 
  2. return delete_metadata_by_mid( 'post' , $mid );