aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/plugins/test/test.php
blob: 3d750c902195dc2a0d3bfdf13687a0c2c5bc3eba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php

/**
 * Hook for test.
 *
 * @param array $data - data passed to plugin.
 *
 * @return mixed altered data.
 */
function hook_test_random($data)
{
    if (isset($data['_PAGE_']) && $data['_PAGE_'] == 'test') {
        $data[1] = 'page test';
    } else if (isset($data['_LOGGEDIN_']) && $data['_LOGGEDIN_'] === true) {
        $data[1] = 'loggedin';
    } else {
        $data[1] = $data[0];
    }

    return $data;
}