mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
[various] Remove App dependency from hook functions
This commit is contained in:
parent
b53914ee11
commit
39c654da00
87 changed files with 419 additions and 451 deletions
|
@ -27,7 +27,7 @@ function mastodoncustomemojis_install()
|
|||
Hook::register('contacts_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
||||
}
|
||||
|
||||
function mastodoncustomemojis_css_hook(App $a)
|
||||
function mastodoncustomemojis_css_hook()
|
||||
{
|
||||
DI::page()['htmlhead'] .= <<<HTML
|
||||
<!-- Style added by mastodoncustomemojis -->
|
||||
|
@ -42,7 +42,7 @@ function mastodoncustomemojis_css_hook(App $a)
|
|||
HTML;
|
||||
}
|
||||
|
||||
function mastodoncustomemojis_put_item_in_cache(App $a, array &$hook_data)
|
||||
function mastodoncustomemojis_put_item_in_cache(array &$hook_data)
|
||||
{
|
||||
// Mastodon uses OStatus and ActivityPub, skipping other network protocols
|
||||
if (empty($hook_data['item']['author-link']) || !in_array($hook_data['item']['network'], [Protocol::OSTATUS, Protocol::ACTIVITYPUB])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue