]> git.immae.eu Git - github/shaarli/Shaarli.git/blame - tests/plugins/test/test.php
PSR: use elseif instead of else if
[github/shaarli/Shaarli.git] / tests / plugins / test / test.php
CommitLineData
6fc14d53
A
1<?php
2
3/**
4 * Hook for test.
5 *
6 * @param array $data - data passed to plugin.
7 *
8 * @return mixed altered data.
9 */
10function hook_test_random($data)
11{
12 if (isset($data['_PAGE_']) && $data['_PAGE_'] == 'test') {
13 $data[1] = 'page test';
d2d4f993 14 } elseif (isset($data['_LOGGEDIN_']) && $data['_LOGGEDIN_'] === true) {
6fc14d53
A
15 $data[1] = 'loggedin';
16 } else {
17 $data[1] = $data[0];
18 }
19
20 return $data;
21}