diff options
author | Andrew Dolgov <[email protected]> | 2021-10-22 13:24:10 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-10-22 13:24:10 +0300 |
commit | 41245da8a65dc8701eb0f2df0bc614d14822ff87 (patch) | |
tree | 684da0e8a3e811d239e07b5c5ade9c547fee3d17 /classes/feeds.php | |
parent | 6fe0751038d530aaecbd2e494833ebc27777d05f (diff) |
pluginhost: update comments for HOOK_ constants to use phpdoc syntax; add HOOK_PRE_SUBSCRIBE
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-x | classes/feeds.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/classes/feeds.php b/classes/feeds.php index 7b6b35645..db62bd6a8 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -1013,6 +1013,13 @@ class Feeds extends Handler_Protected { if (!$url) return ["code" => 2]; + PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_PRE_SUBSCRIBE, + /** @phpstan-ignore-next-line */ + function ($result) use (&$url, &$auth_login, &$auth_pass) { + // arguments are updated inside the hook (if needed) + }, + $url, $auth_login, $auth_pass); + $contents = UrlHelper::fetch($url, false, $auth_login, $auth_pass); PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_SUBSCRIBE_FEED, |