get_post_meta_by_id

Get post meta data by meta ID.

Description

(object|bool) get_post_meta_by_id( (int) $mid ); 

Returns (object|bool)

Parameters (1)

0. $mid (int)
The mid.

Usage

  1. if ( !function_exists( 'get_post_meta_by_id' ) ) { 
  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 = get_post_meta_by_id($mid); 
  9.  

Defined (1)

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

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