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; }