This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Video_Post::set_post_status( string $post_status = 'publish' )


Parameters

$post_status

(Optional)

Default value: 'publish'


Return

(int|void|\WP_Error)


Source

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

	private function set_post_status( $post_status = 'publish' ){
		if( !$this->_post ){
			return;
		}

		$statuses = ['publish', 'pending', 'draft', 'private'];
		if( !in_array( $post_status, $statuses ) ){
			trigger_error(
				sprintf(
					'Post status cannot be changed to %s. Allowed values are: %s.',
					$post_status,
					implode( ', ', $statuses )
				),
				E_USER_WARNING
			);
			return;
		}

		return wp_update_post([
			'post_status' => $post_status,
			'ID' => $this->_post->ID
		]);
	}

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!