is_videopress_attachment

Check to see if this is a VideoPress attachment.

Description

is_videopress_attachment( (int) $post_id ); 

Parameters (1)

0. $post_id (int)
The post id.

Usage

  1. if ( !function_exists( 'is_videopress_attachment' ) ) { 
  2. require_once '/modules/videopress/utility-functions.php'; 
  3.  
  4. // The post id. 
  5. $post_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = is_videopress_attachment($post_id); 
  9.  

Defined (1)

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

/modules/videopress/utility-functions.php  
  1. function is_videopress_attachment( $post_id ) { 
  2. $post = get_post( $post_id ); 
  3.  
  4. if ( is_wp_error( $post ) ) { 
  5. return false; 
  6.  
  7. if ( $post->post_mime_type !== 'video/videopress' ) { 
  8. return false; 
  9.  
  10. return true;