aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/en/developers/03_Backend/05_Extensions.md6
-rw-r--r--docs/fr/developers/03_Backend/05_Extensions.md4
2 files changed, 5 insertions, 5 deletions
diff --git a/docs/en/developers/03_Backend/05_Extensions.md b/docs/en/developers/03_Backend/05_Extensions.md
index fcae42b5a..189e5d64f 100644
--- a/docs/en/developers/03_Backend/05_Extensions.md
+++ b/docs/en/developers/03_Backend/05_Extensions.md
@@ -143,8 +143,8 @@ final class HelloWorldExtension extends Minz_Extension
public function init(): void {
parent::init();
- $this->registerHook('entry_before_display', [$this, 'renderEntry']);
- $this->registerHook('check_url_before_add', [self::class, 'checkUrl']);
+ $this->registerHook(Minz_HookType::EntryBeforeDisplay, [$this, 'renderEntry']);
+ $this->registerHook(Minz_HookType::CheckUrlBeforeAdd, [self::class, 'checkUrl']);
}
public function renderEntry(FreshRSS_Entry $entry): FreshRSS_Entry {
@@ -164,7 +164,7 @@ final class HelloWorldExtension extends Minz_Extension
The following events are available:
-* `api_misc` (`function(): void`): to allow extensions to have own API endpoint
+* `api_misc` (`function(): void`): to allow extensions to have their own API endpoint
on `/api/misc.php/Extension%20Name/` or `/api/misc.php?ext=Extension%20Name`.
* `before_login_btn` (`function(): string`): Allows to insert HTML before the login button. Applies to the create button on the register page as well. Example use case is inserting a captcha widget.
* `check_url_before_add` (`function($url) -> Url | null`): will be executed every time a URL is added. The URL itself will be passed as parameter. This way a website known to have feeds which doesn’t advertise it in the header can still be automatically supported.
diff --git a/docs/fr/developers/03_Backend/05_Extensions.md b/docs/fr/developers/03_Backend/05_Extensions.md
index 18cc892be..00a229e94 100644
--- a/docs/fr/developers/03_Backend/05_Extensions.md
+++ b/docs/fr/developers/03_Backend/05_Extensions.md
@@ -197,8 +197,8 @@ final class HelloWorldExtension extends Minz_Extension
public function init(): void {
parent::init();
- $this->registerHook('entry_before_display', [$this, 'renderEntry']);
- $this->registerHook('check_url_before_add', [self::class, 'checkUrl']);
+ $this->registerHook(Minz_HookType::EntryBeforeDisplay, [$this, 'renderEntry']);
+ $this->registerHook(Minz_HookType::CheckUrlBeforeAdd, [self::class, 'checkUrl']);
}
public function renderEntry(FreshRSS_Entry $entry): FreshRSS_Entry {