From 2e9f640724ebedef866908d50426c1fbe34edb4d Mon Sep 17 00:00:00 2001 From: loma-one Date: Sat, 7 Mar 2026 17:09:57 +0100 Subject: [PATCH] quickphoto/quickphoto.php aktualisiert DI::l10n()->t inserted --- quickphoto/quickphoto.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/quickphoto/quickphoto.php b/quickphoto/quickphoto.php index 7e7bd1a0..185665a6 100644 --- a/quickphoto/quickphoto.php +++ b/quickphoto/quickphoto.php @@ -6,17 +6,16 @@ * Author: Matthias Ebers */ +use Friendica\Core\Hook; +use Friendica\DI; + function quickphoto_install() { - Friendica\Core\Hook::register('page_header', 'addon/quickphoto/quickphoto.php', 'quickphoto_header'); - Friendica\Core\Hook::register('post_post', 'addon/quickphoto/quickphoto.php', 'quickphoto_post_hook'); + Hook::register('page_header', 'addon/quickphoto/quickphoto.php', 'quickphoto_header'); + Hook::register('post_post', 'addon/quickphoto/quickphoto.php', 'quickphoto_post_hook'); } function quickphoto_header(&$header) { - $desc_label = 'Image description'; - - if (function_exists('t')) { - $desc_label = t('Image description'); - } + $desc_label = DI::l10n()->t('Image description'); $js_label = addslashes($desc_label);