get_post_metadata

The WordPress Core get post metadata hook.

Description

add_filter( 'get_post_metadata', (string) $jetpack_featured_images_remove_post_thumbnail, (bool) $true, (int) $int ); 

Parameters (3)

0. $jetpack_featured_images_remove_post_thumbnail (string) => 'jetpack_featured_images_remove_post_thumbnail'
The jetpack featured images remove post thumbnail.
1. $true (bool) => true
The true.
2. $int (int) => 4
The int.

Usage

To run the hook, copy the example below.
  1. $jetpack_featured_images_remove_post_thumbnail = apply_filters( 'get_post_metadata', $jetpack_featured_images_remove_post_thumbnail, $true, $int ); 
  2.  
  3. if ( !empty( $jetpack_featured_images_remove_post_thumbnail ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the get_post_metadata callback 
  2. function filter_get_post_metadata( $jetpack_featured_images_remove_post_thumbnail, $true, $int ) { 
  3. // make filter magic happen here... 
  4. return $jetpack_featured_images_remove_post_thumbnail
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'get_post_metadata', 'filter_get_post_metadata', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'get_post_metadata', 'filter_get_post_metadata', 10, 3 ); 

Defined (1)

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

/modules/theme-tools/content-options/featured-images.php  
  1. add_filter( 'get_post_metadata', 'jetpack_featured_images_remove_post_thumbnail', true, 4 );