]>
git.immae.eu Git - github/shaarli/Shaarli.git/blob - plugins/playvideos/playvideos.php
5 * Add a button in the toolbar allowing to watch all videos.
6 * Note: this plugin adds jQuery.
10 * When linklist is displayed, add play videos to header's toolbar.
12 * @param array $data - header data.
14 * @return mixed - header data with playvideos toolbar item.
16 function hook_playvideos_render_header($data)
18 if ($data['_PAGE_'] == Router
::$PAGE_LINKLIST) {
22 'title' => 'Video player',
25 'html' => '► Play Videos'
27 $data['buttons_toolbar'][] = $playvideo;
34 * When linklist is displayed, include playvideos JS files.
36 * @param array $data - footer data.
38 * @return mixed - footer data with playvideos JS files added.
40 function hook_playvideos_render_footer($data)
42 if ($data['_PAGE_'] == Router
::$PAGE_LINKLIST) {
43 $data['js_files'][] = PluginManager
::$PLUGINS_PATH . '/playvideos/jquery-1.11.2.min.js';
44 $data['js_files'][] = PluginManager
::$PLUGINS_PATH . '/playvideos/youtube_playlist.js';