mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-08 05:34:27 +02:00
Create event for home_content hook
This commit is contained in:
parent
a9f02bfef5
commit
a9b36f55c9
6 changed files with 19 additions and 9 deletions
|
@ -116,7 +116,7 @@ class Friendica extends BaseModule
|
|||
$hooked = '';
|
||||
|
||||
$hooked = $this->eventDispatcher->dispatch(
|
||||
new HtmlFilterEvent(HtmlFilterEvent::ABOUT_CONTENT, $hooked),
|
||||
new HtmlFilterEvent(HtmlFilterEvent::MOD_ABOUT_CONTENT, $hooked),
|
||||
)->getHtml();
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('friendica.tpl');
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
namespace Friendica\Module;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Event\Event;
|
||||
use Friendica\Event\HtmlFilterEvent;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Protocol\ActivityPub;
|
||||
|
@ -66,7 +66,10 @@ class Home extends BaseModule
|
|||
$login = Login::form(DI::args()->getQueryString(), Register::getPolicy() !== Register::CLOSED);
|
||||
|
||||
$content = '';
|
||||
Hook::callAll('home_content', $content);
|
||||
|
||||
$content = $eventDispatcher->dispatch(
|
||||
new HtmlFilterEvent(HtmlFilterEvent::MOD_HOME_CONTENT, $content),
|
||||
)->getHtml();
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('home.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue