Helper::video_is_visible()

Checks if video embed is visible.


Description

Determines if a video attached to current global post can be displayed into the page. Will always return false for pages and attachments unless "display in archives" option is enabled.


Return

(bool) Video is visible (true) or is hidden (false);


Source

File: includes/libs/helper.class.php

	public static function video_is_visible(){
		$options = Plugin::instance()->get_options();
		$is_visible = $options[ 'archives' ] ? true : is_single();
		if( is_admin() || ! $is_visible || !self::get_video_post()->is_video() ){
			return false;
		}
		return true;
	}

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!