aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/plugins/test/test.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2015-07-15 11:42:15 +0200
committerArthurHoaro <arthur@hoa.ro>2015-11-07 15:27:17 +0100
commit6fc14d530369740d27d6bd641369d4f5f5f04080 (patch)
tree2da553378e8f0ff367dcb677d6f519d1fb3e803c /tests/plugins/test/test.php
parent38bedfbbcdd2a40e9f04f5753e0fd6f4fd513c21 (diff)
downloadShaarli-6fc14d530369740d27d6bd641369d4f5f5f04080.tar.gz
Shaarli-6fc14d530369740d27d6bd641369d4f5f5f04080.tar.zst
Shaarli-6fc14d530369740d27d6bd641369d4f5f5f04080.zip
Plugin system - CORE
see shaarli/Shaarli#275
Diffstat (limited to 'tests/plugins/test/test.php')
-rwxr-xr-xtests/plugins/test/test.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/plugins/test/test.php b/tests/plugins/test/test.php
new file mode 100755
index 00000000..3d750c90
--- /dev/null
+++ b/tests/plugins/test/test.php
@@ -0,0 +1,21 @@
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';
14 } else if (isset($data['_LOGGEDIN_']) && $data['_LOGGEDIN_'] === true) {
15 $data[1] = 'loggedin';
16 } else {
17 $data[1] = $data[0];
18 }
19
20 return $data;
21}