]> git.immae.eu Git - github/shaarli/Shaarli.git/blame - plugins/playvideos/playvideos.php
PLUGIN playvideos
[github/shaarli/Shaarli.git] / plugins / playvideos / playvideos.php
CommitLineData
b17c19ff
A
1<?php
2
3/**
4 * When linklist is displayed, add play videos to header's toolbar.
5 *
6 * @param array $data - header data.
7 * @return mixed - header data with playvideos toolbar item.
8 */
9function hook_playvideos_render_header($data) {
10 if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) {
11 $data['buttons_toolbar'][] = file_get_contents(PluginManager::$PLUGINS_PATH . '/playvideos/playvideos.html');
12 }
13
14 return $data;
15}
16
17/**
18 * When linklist is displayed, include playvideos JS files.
19 *
20 * @param array $data - footer data.
21 * @return mixed - footer data with playvideos JS files added.
22 */
23function hook_playvideos_render_footer($data) {
24 if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) {
25 $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/playvideos/jquery-1.11.2.min.js';
26 $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/playvideos/youtube_playlist.js';
27 }
28
29 return $data;
30}