aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/playvideos/playvideos.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/playvideos/playvideos.php')
-rw-r--r--plugins/playvideos/playvideos.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/plugins/playvideos/playvideos.php b/plugins/playvideos/playvideos.php
new file mode 100644
index 00000000..9918453c
--- /dev/null
+++ b/plugins/playvideos/playvideos.php
@@ -0,0 +1,30 @@
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} \ No newline at end of file