You appear to be a bot. Output may be restricted
Description
Usage
$bool = VideoPress_XMLRPC::update_poster_image( $request );
Parameters
- $request
- ( array ) required –
Returns
bool
Source
File name: jetpack/modules/videopress/class.videopress-xmlrpc.php
Lines:
1 to 29 of 29
public function update_poster_image( $request ) { $this->authenticate_user(); $post_id = $request['post_id']; $poster = $request['poster']; if ( ! $attachment = get_post( $post_id ) ) { return false; } // We add ssl => 1 to make sure that the videos.files.wordpress.com domain is parsed as photon. $poster = apply_filters( 'jetpack_photon_url', $poster, array( 'ssl' => 1 ), 'https' ); $meta = wp_get_attachment_metadata( $post_id ); $meta['videopress']['poster'] = $poster; wp_update_attachment_metadata( $post_id, $meta ); // Update the poster in the VideoPress info. $thumbnail_id = videopress_download_poster_image( $poster, $post_id ); if ( ! is_int( $thumbnail_id ) ) { return false; } update_post_meta( $post_id, '_thumbnail_id', $thumbnail_id ); return true; }