enhanced_og_has_featured_image

The Jetpack by WordPress.com enhanced og has featured image function.

Description

enhanced_og_has_featured_image( $post_id ); 

Parameters (1)

0. $post_id
The post id.

Usage

  1. if ( !function_exists( 'enhanced_og_has_featured_image' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/publicize/enhanced-open-graph.php'; 
  3.  
  4. // The post id. 
  5. $post_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = enhanced_og_has_featured_image($post_id); 
  9.  

Defined (1)

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

/modules/publicize/enhanced-open-graph.php  
  1. function enhanced_og_has_featured_image( $post_id ) { 
  2. $featured = Jetpack_PostImages::from_thumbnail( $post_id, 200, 200 ); 
  3. if ( !empty( $featured ) && count( $featured ) > 0 ) 
  4. return true; 
  5. return false;