Video_Post::set_video_data( array $data )

Set video data on post.


Parameters

$data

(Required) An array of options that should be set on the post.


Return

(bool|int|void)


Source

File: includes/libs/video-post.class.php

	public function set_video_data( $data ){
		if( !$this->_post ){
			return;
		}

		$_data = $this->get_video_data();
		if( $_data ) {
			foreach ( $data as $key => $value ) {
				if ( isset( $_data[ $key ] ) ) {
					$_data[ $key ] = $value;
				}
			}
		}else{
			// if set for the first time, set the entire data as post meta
			$_data = $data;
			$this->_set_properties( $data );
		}

		return $this->update_meta(
			$this->cpt()->get_post_settings()->get_meta_video_data(),
			$_data
		);
	}

Start your video site now!

Manage and coordinate your Vimeo channels, albums or videos with your WordPress website. Perfect fit for membership, portfolio, online courses or any type of video collection.

Get Vimeotheque PRO!