videopress_prepare_attachment_for_js

The WordPress Core videopress prepare attachment for js function.

Description

videopress_prepare_attachment_for_js( $post ); 

Parameters (1)

0. $post
The post.

Usage

  1. if ( !function_exists( 'videopress_prepare_attachment_for_js' ) ) { 
  2. require_once '/modules/videopress/editor-media-view.php'; 
  3.  
  4. // The post. 
  5. $post = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = videopress_prepare_attachment_for_js($post); 
  9.  

Defined (1)

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

/modules/videopress/editor-media-view.php  
  1. function videopress_prepare_attachment_for_js( $post ) { 
  2. if ( 'video' === $post['type'] ) { 
  3. $guid = get_post_meta( $post['id'], 'videopress_guid' ); 
  4. if ( $guid ) { 
  5. $post['videopress_guid'] = $guid; 
  6. return $post;