Create test addon

This commit is contained in:
Art4 2024-12-31 01:56:19 +00:00
parent f741e1e1b1
commit 4e330d4969

View 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>';
}