]>
Commit | Line | Data |
---|---|---|
1b2b44f4 A |
1 | <?php |
2 | ||
ff5bda82 A |
3 | /** |
4 | * Plugin addlink_toolbar. | |
5 | * Adds the addlink input on the linklist page. | |
6 | */ | |
7 | ||
1b2b44f4 A |
8 | /** |
9 | * When linklist is displayed, add play videos to header's toolbar. | |
10 | * | |
11 | * @param array $data - header data. | |
ff5bda82 | 12 | * |
1b2b44f4 A |
13 | * @return mixed - header data with addlink toolbar item. |
14 | */ | |
ff5bda82 A |
15 | function hook_addlink_toolbar_render_header($data) |
16 | { | |
1b2b44f4 | 17 | if ($data['_PAGE_'] == Router::$PAGE_LINKLIST && $data['_LOGGEDIN_'] === true) { |
ba0fd807 A |
18 | $form = array( |
19 | 'attr' => array( | |
20 | 'method' => 'GET', | |
21 | 'action' => '', | |
22 | 'name' => 'addform', | |
23 | 'class' => 'addform', | |
24 | ), | |
25 | 'inputs' => array( | |
26 | array( | |
27 | 'type' => 'text', | |
28 | 'name' => 'post', | |
29 | 'placeholder' => 'URI', | |
30 | ), | |
31 | array( | |
32 | 'type' => 'submit', | |
33 | 'value' => 'Add link', | |
34 | 'class' => 'bigbutton', | |
35 | ), | |
36 | ), | |
37 | ); | |
38 | $data['fields_toolbar'][] = $form; | |
1b2b44f4 A |
39 | } |
40 | ||
41 | return $data; | |
42 | } |