diff --git a/plugin/TheaterButton/TheaterButton.php b/plugin/TheaterButton/TheaterButton.php index 85e889ec9..caba9f498 100755 --- a/plugin/TheaterButton/TheaterButton.php +++ b/plugin/TheaterButton/TheaterButton.php @@ -1,96 +1,96 @@ show_switch_button = true; $obj->compress_is_default = false; return $obj; } public function getHeadCode() { global $global; if (empty($_GET['videoName'])) { return ""; } $tmp = "mainVideo"; if(!empty($_SESSION['type'])){ if(($_SESSION['type']=="audio")||($_SESSION['type']=="linkAudio")){ $tmp = "mainAudio"; } } $css = ''; $css .= ''; return $css; } public function getJSFiles(){ global $global, $autoPlayVideo, $isEmbed; if (!$this->showButton()) { return ""; } $obj = $this->getDataObject(); if(!empty($obj->show_switch_button)){ return array("plugin/TheaterButton/script.js","plugin/TheaterButton/addButton.js"); } return array("plugin/TheaterButton/script.js"); } public function getFooterCode() { global $global, $autoPlayVideo, $isEmbed; if (!$this->showButton()) { return ""; } $obj = $this->getDataObject(); $js = ''; if(empty($obj->show_switch_button)){ if($obj->compress_is_default){ $js .= ''; }else{ $js .= ''; } } return $js; } private function showButton(){ global $global, $isEmbed, $advancedCustom; if ((empty($_GET['videoName']))) { return false; } $video = Video::getVideoFromCleanTitle($_GET['videoName']); - if(($isEmbed==1 || $video['type']=='embed') && !$advancedCustom->disableYoutubePlayerIntegration){ + if(($isEmbed==1 || $video['type']=='embed') && $advancedCustom->disableYoutubePlayerIntegration){ return false; } if($video['type']=='article' || $video['type']=='pdf'){ return false; } return true; } public function getTags() { return array('free', 'buttons', 'video player'); } }