X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget%2FTrendingTags.php;h=3eb7d24069f5e60b5d7f1d584c374cb2a03c8212;hb=61484c3c4c5b02210e60130268e4529e12bfcde0;hp=4ac8a1119e811f5d1742416201f71debdcce3d73;hpb=d45575e0fa94b47bc3976adc91dd5d360017e9ae;p=friendica.git diff --git a/src/Content/Widget/TrendingTags.php b/src/Content/Widget/TrendingTags.php index 4ac8a1119e..3eb7d24069 100644 --- a/src/Content/Widget/TrendingTags.php +++ b/src/Content/Widget/TrendingTags.php @@ -1,10 +1,29 @@ . + * + */ namespace Friendica\Content\Widget; -use Friendica\Core\L10n; use Friendica\Core\Renderer; -use Friendica\Model\Term; +use Friendica\DI; +use Friendica\Model\Tag; /** * Trending tags aside widget for the community pages, handles both local and global scopes @@ -22,15 +41,15 @@ class TrendingTags public static function getHTML($content = 'global', int $period = 24) { if ($content == 'local') { - $tags = Term::getLocalTrendingHashtags($period, 20); + $tags = Tag::getLocalTrendingHashtags($period, 20); } else { - $tags = Term::getGlobalTrendingHashtags($period, 20); + $tags = Tag::getGlobalTrendingHashtags($period, 20); } $tpl = Renderer::getMarkupTemplate('widget/trending_tags.tpl'); $o = Renderer::replaceMacros($tpl, [ - '$title' => L10n::tt('Trending Tags (last %d hour)', 'Trending Tags (last %d hours)', $period), - '$more' => L10n::t('More Trending Tags'), + '$title' => DI::l10n()->tt('Trending Tags (last %d hour)', 'Trending Tags (last %d hours)', $period), + '$more' => DI::l10n()->t('More Trending Tags'), '$tags' => $tags, ]);