mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 10:05:43 +02:00
Create test addon
This commit is contained in:
parent
f741e1e1b1
commit
4e330d4969
1 changed files with 29 additions and 0 deletions
29
tests/Util/helloaddon/helloaddon.php
Normal file
29
tests/Util/helloaddon/helloaddon.php
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name: Hello Addon
|
||||||
|
* Description: For testing purpose only
|
||||||
|
* Version: 1.0
|
||||||
|
* Author: Artur Weigandt <dont-mail-me@example.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Friendica\Core\Hook;
|
||||||
|
|
||||||
|
function helloaddon_install()
|
||||||
|
{
|
||||||
|
Hook::register('page_end', 'addon/helloaddon/helloaddon.php', 'helloaddon_page_end');
|
||||||
|
}
|
||||||
|
|
||||||
|
function helloaddon_uninstall()
|
||||||
|
{
|
||||||
|
Hook::unregister('page_end', 'addon/helloaddon/helloaddon.php', 'helloaddon_page_end');
|
||||||
|
}
|
||||||
|
|
||||||
|
function helloaddon_page_end(&$html)
|
||||||
|
{
|
||||||
|
$html .= '<p>Hello, World!</p>';
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue