Plugin system - CORE

see 
This commit is contained in:
ArthurHoaro 2015-07-15 11:42:15 +02:00
parent 38bedfbbcd
commit 6fc14d5303
8 changed files with 1190 additions and 197 deletions
tests/plugins/test

21
tests/plugins/test/test.php Executable file
View file

@ -0,0 +1,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;
}