Merge pull request #14248 from mexon/mat/moderation-tab-hook

Add addon hook for additional moderation tabs
This commit is contained in:
Hypolite Petovan 2024-06-23 15:24:14 -04:00 committed by GitHub
commit 16f5d2033d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,6 +22,7 @@
namespace Friendica\Module\Moderation;
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Core\Session\Capability\IHandleUserSessions;
@ -106,9 +107,11 @@ abstract class BaseUsers extends BaseModeration
'accesskey' => 'd',
],
];
$tabs_arr = ['tabs' => $tabs, 'selectedTab' => $selectedTab];
Hook::callAll('moderation_users_tabs', $tabs_arr);
$tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
return Renderer::replaceMacros($tpl, ['$tabs' => $tabs]);
return Renderer::replaceMacros($tpl, ['$tabs' => $tabs_arr['tabs']]);
}
protected function setupUserCallback(): \Closure