X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=plugins%2Fplayvideos%2Fplayvideos.php;h=4f874f92b98b4d09464ca5e748b03fe47135dd36;hb=refs%2Fpull%2F1671%2Fhead;hp=644845049ff6599407fc43f9c5d99a9c0d4efd81;hpb=ba0fd80732acbff0fcda57a0b31e4edfaa337001;p=github%2Fshaarli%2FShaarli.git diff --git a/plugins/playvideos/playvideos.php b/plugins/playvideos/playvideos.php index 64484504..4f874f92 100644 --- a/plugins/playvideos/playvideos.php +++ b/plugins/playvideos/playvideos.php @@ -1,4 +1,5 @@ array( + if ($data['_PAGE_'] == TemplatePage::LINKLIST) { + $playvideo = [ + 'attr' => [ 'href' => '#', - 'title' => 'Video player', + 'title' => t('Video player'), 'id' => 'playvideos', - ), - 'html' => '► Play Videos' - ); + ], + 'html' => '► ' . t('Play Videos') + ]; $data['buttons_toolbar'][] = $playvideo; } @@ -39,10 +43,19 @@ function hook_playvideos_render_header($data) */ function hook_playvideos_render_footer($data) { - if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) { + if ($data['_PAGE_'] == TemplatePage::LINKLIST) { $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/playvideos/jquery-1.11.2.min.js'; $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/playvideos/youtube_playlist.js'; } return $data; } + +/** + * This function is never called, but contains translation calls for GNU gettext extraction. + */ +function playvideos_dummy_translation() +{ + // meta + t('Add a button in the toolbar allowing to watch all videos.'); +}