]> git.mxchange.org Git - friendica-addons.git/commitdiff
Replace deprecated Addon::*registerHook by Hook::*register
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 26 Dec 2018 07:28:16 +0000 (02:28 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 26 Dec 2018 15:20:18 +0000 (10:20 -0500)
82 files changed:
advancedcontentfilter/advancedcontentfilter.php
blackout/blackout.php
blockem/blockem.php
blogger/blogger.php
buffer/buffer.php
buglink/buglink.php
calc/calc.php
catavatar/catavatar.php
convert/convert.php
curweather/curweather.php
diaspora/diaspora.php
dwpost/dwpost.php
fortunate/fortunate.php
forumdirectory/forumdirectory.php
fromapp/fromapp.php
fromgplus/fromgplus.php
geocoordinates/geocoordinates.php
geonames/geonames.php
gnot/gnot.php
googlemaps/googlemaps.php
gravatar/gravatar.php
group_text/group_text.php
highlightjs/highlightjs.php
ifttt/ifttt.php
ijpost/ijpost.php
impressum/impressum.php
infiniteimprobabilitydrive/infiniteimprobabilitydrive.php
irc/irc.php
jappixmini/jappixmini.php
js_upload/js_upload.php
krynn/krynn.php
langfilter/langfilter.php
ldapauth/ldapauth.php
leistungsschutzrecht/leistungsschutzrecht.php
libertree/libertree.php
libravatar/libravatar.php
ljpost/ljpost.php
mahjongg/mahjongg.php
mailstream/mailstream.php
mastodoncustomemojis/mastodoncustomemojis.php
mathjax/mathjax.php
membersince/membersince.php
morechoice/morechoice.php
morepokes/morepokes.php
namethingy/namethingy.php
newmemberwidget/newmemberwidget.php
notimeline/notimeline.php
nsfw/nsfw.php
numfriends/numfriends.php
openstreetmap/openstreetmap.php
pageheader/pageheader.php
piwik/piwik.php
planets/planets.php
pledgie/pledgie.php
public_server/public_server.php
pumpio/pumpio.php
qcomment/qcomment.php
randplace/randplace.php
remote_permissions/remote_permissions.php
rendertime/rendertime.php
securemail/securemail.php
showmore/showmore.php
smiley_pack/lang/smiley_pack_es/smiley_pack_es.php
smiley_pack/lang/smiley_pack_fr/smiley_pack_fr.php
smiley_pack/smiley_pack.php
smileybutton/smileybutton.php
smilies_adult/smilies_adult.php
sniper/sniper.php
startpage/startpage.php
statusnet/statusnet.php
superblock/superblock.php
testdrive/testdrive.php
tictac/tictac.php
tumblr/tumblr.php
twitter/twitter.php
unicode_smilies/unicode_smilies.php
viewsrc/viewsrc.php
webrtc/webrtc.php
widgets/widgets.php
windowsphonepush/windowsphonepush.php
wppost/wppost.php
xmpp/xmpp.php

index a00f2f070d4214e14127ddb10bb1ed38fed6c2a6..6479fe8e98f7bd6f2da13cdfb60bb66db7f5aa62 100644 (file)
@@ -36,8 +36,8 @@
 use Friendica\App;
 use Friendica\BaseModule;
 use Friendica\Content\Text\Markdown;
-use Friendica\Core\Addon;
 use Friendica\Core\Cache;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
@@ -60,9 +60,9 @@ require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'a
 
 function advancedcontentfilter_install()
 {
-       Addon::registerHook('dbstructure_definition'     , __FILE__, 'advancedcontentfilter_dbstructure_definition');
-       Addon::registerHook('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
-       Addon::registerHook('addon_settings'             , __FILE__, 'advancedcontentfilter_addon_settings');
+       Hook::register('dbstructure_definition'     , __FILE__, 'advancedcontentfilter_dbstructure_definition');
+       Hook::register('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
+       Hook::register('addon_settings'             , __FILE__, 'advancedcontentfilter_addon_settings');
 
        DBStructure::update(false, true);
 
@@ -71,9 +71,9 @@ function advancedcontentfilter_install()
 
 function advancedcontentfilter_uninstall()
 {
-       Addon::unregisterHook('dbstructure_definition'     , __FILE__, 'advancedcontentfilter_dbstructure_definition');
-       Addon::unregisterHook('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
-       Addon::unregisterHook('addon_settings'             , __FILE__, 'advancedcontentfilter_addon_settings');
+       Hook::unregister('dbstructure_definition'     , __FILE__, 'advancedcontentfilter_dbstructure_definition');
+       Hook::unregister('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
+       Hook::unregister('addon_settings'             , __FILE__, 'advancedcontentfilter_addon_settings');
 }
 
 /*
index c0e0dc598a0af06c6d9d06c9caafaaa97a208536..6885420016a6878a00b97a69548f134d84b73b8e 100644 (file)
  */
 
 use Friendica\Core\Config;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
 
 function blackout_install() {
-    Addon::registerHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
+    Hook::register('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
 }
 
 function blackout_uninstall() {
-    Addon::unregisterHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
+    Hook::unregister('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
 }
 function blackout_redirect ($a, $b) {
     // if we have a logged in user, don't throw her out
index c8b6c907155f53e02574b1e48c67bcbab51dc1b1..e0c0a74a29894870218f17afc584c9f1c0e97373 100644 (file)
@@ -8,32 +8,32 @@
  */
 
 use Friendica\App;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Util\Strings;
 
 function blockem_install()
 {
-       Addon::registerHook('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
-       Addon::registerHook('display_item'               , 'addon/blockem/blockem.php', 'blockem_display_item');
-       Addon::registerHook('addon_settings'             , 'addon/blockem/blockem.php', 'blockem_addon_settings');
-       Addon::registerHook('addon_settings_post'        , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
-       Addon::registerHook('conversation_start'         , 'addon/blockem/blockem.php', 'blockem_conversation_start');
-       Addon::registerHook('item_photo_menu'            , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
-       Addon::registerHook('enotify_store'              , 'addon/blockem/blockem.php', 'blockem_enotify_store');
+       Hook::register('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
+       Hook::register('display_item'               , 'addon/blockem/blockem.php', 'blockem_display_item');
+       Hook::register('addon_settings'             , 'addon/blockem/blockem.php', 'blockem_addon_settings');
+       Hook::register('addon_settings_post'        , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
+       Hook::register('conversation_start'         , 'addon/blockem/blockem.php', 'blockem_conversation_start');
+       Hook::register('item_photo_menu'            , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
+       Hook::register('enotify_store'              , 'addon/blockem/blockem.php', 'blockem_enotify_store');
 }
 
 function blockem_uninstall()
 {
-       Addon::unregisterHook('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
-       Addon::unregisterHook('prepare_body'               , 'addon/blockem/blockem.php', 'blockem_prepare_body');
-       Addon::unregisterHook('display_item'               , 'addon/blockem/blockem.php', 'blockem_display_item');
-       Addon::unregisterHook('addon_settings'             , 'addon/blockem/blockem.php', 'blockem_addon_settings');
-       Addon::unregisterHook('addon_settings_post'        , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
-       Addon::unregisterHook('conversation_start'         , 'addon/blockem/blockem.php', 'blockem_conversation_start');
-       Addon::unregisterHook('item_photo_menu'            , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
-       Addon::unregisterHook('enotify_store'              , 'addon/blockem/blockem.php', 'blockem_enotify_store');
+       Hook::unregister('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
+       Hook::unregister('prepare_body'               , 'addon/blockem/blockem.php', 'blockem_prepare_body');
+       Hook::unregister('display_item'               , 'addon/blockem/blockem.php', 'blockem_display_item');
+       Hook::unregister('addon_settings'             , 'addon/blockem/blockem.php', 'blockem_addon_settings');
+       Hook::unregister('addon_settings_post'        , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
+       Hook::unregister('conversation_start'         , 'addon/blockem/blockem.php', 'blockem_conversation_start');
+       Hook::unregister('item_photo_menu'            , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
+       Hook::unregister('enotify_store'              , 'addon/blockem/blockem.php', 'blockem_enotify_store');
 }
 
 function blockem_addon_settings (App $a, &$s)
index 3faba1ca745ac7a91bde6dc265a5187797196079..066de29e158b16a5d3ef49ad613de70d566b097f 100644 (file)
@@ -8,7 +8,7 @@
 
 use Friendica\App;
 use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -17,27 +17,27 @@ use Friendica\Util\XML;
 
 function blogger_install()
 {
-       Addon::registerHook('hook_fork',               'addon/blogger/blogger.php', 'blogger_hook_fork');
-       Addon::registerHook('post_local',              'addon/blogger/blogger.php', 'blogger_post_local');
-       Addon::registerHook('notifier_normal',         'addon/blogger/blogger.php', 'blogger_send');
-       Addon::registerHook('jot_networks',            'addon/blogger/blogger.php', 'blogger_jot_nets');
-       Addon::registerHook('connector_settings',      'addon/blogger/blogger.php', 'blogger_settings');
-       Addon::registerHook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
+       Hook::register('hook_fork',               'addon/blogger/blogger.php', 'blogger_hook_fork');
+       Hook::register('post_local',              'addon/blogger/blogger.php', 'blogger_post_local');
+       Hook::register('notifier_normal',         'addon/blogger/blogger.php', 'blogger_send');
+       Hook::register('jot_networks',            'addon/blogger/blogger.php', 'blogger_jot_nets');
+       Hook::register('connector_settings',      'addon/blogger/blogger.php', 'blogger_settings');
+       Hook::register('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
 }
 
 function blogger_uninstall()
 {
-       Addon::unregisterHook('hook_fork',               'addon/blogger/blogger.php', 'blogger_hook_fork');
-       Addon::unregisterHook('post_local',              'addon/blogger/blogger.php', 'blogger_post_local');
-       Addon::unregisterHook('notifier_normal',         'addon/blogger/blogger.php', 'blogger_send');
-       Addon::unregisterHook('jot_networks',            'addon/blogger/blogger.php', 'blogger_jot_nets');
-       Addon::unregisterHook('connector_settings',      'addon/blogger/blogger.php', 'blogger_settings');
-       Addon::unregisterHook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
+       Hook::unregister('hook_fork',               'addon/blogger/blogger.php', 'blogger_hook_fork');
+       Hook::unregister('post_local',              'addon/blogger/blogger.php', 'blogger_post_local');
+       Hook::unregister('notifier_normal',         'addon/blogger/blogger.php', 'blogger_send');
+       Hook::unregister('jot_networks',            'addon/blogger/blogger.php', 'blogger_jot_nets');
+       Hook::unregister('connector_settings',      'addon/blogger/blogger.php', 'blogger_settings');
+       Hook::unregister('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
 
        // obsolete - remove
-       Addon::unregisterHook('post_local_end',      'addon/blogger/blogger.php', 'blogger_send');
-       Addon::unregisterHook('addon_settings',      'addon/blogger/blogger.php', 'blogger_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
+       Hook::unregister('post_local_end',      'addon/blogger/blogger.php', 'blogger_send');
+       Hook::unregister('addon_settings',      'addon/blogger/blogger.php', 'blogger_settings');
+       Hook::unregister('addon_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
 }
 
 
index 385bdd5bb32fce27cbe9f54977c895098aae60a8..78e695a37b1b7b2e08e6f319db1feac66364f521 100644 (file)
@@ -8,9 +8,8 @@
 require 'addon/buffer/bufferapp.php';
 
 use Friendica\App;
-use Friendica\Content\Text\Plaintext;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -23,22 +22,22 @@ use Friendica\Util\Strings;
 
 function buffer_install()
 {
-       Addon::registerHook('hook_fork',            'addon/buffer/buffer.php', 'buffer_hook_fork');
-       Addon::registerHook('post_local',           'addon/buffer/buffer.php', 'buffer_post_local');
-       Addon::registerHook('notifier_normal',      'addon/buffer/buffer.php', 'buffer_send');
-       Addon::registerHook('jot_networks',         'addon/buffer/buffer.php', 'buffer_jot_nets');
-       Addon::registerHook('connector_settings',      'addon/buffer/buffer.php', 'buffer_settings');
-       Addon::registerHook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
+       Hook::register('hook_fork',            'addon/buffer/buffer.php', 'buffer_hook_fork');
+       Hook::register('post_local',           'addon/buffer/buffer.php', 'buffer_post_local');
+       Hook::register('notifier_normal',      'addon/buffer/buffer.php', 'buffer_send');
+       Hook::register('jot_networks',         'addon/buffer/buffer.php', 'buffer_jot_nets');
+       Hook::register('connector_settings',      'addon/buffer/buffer.php', 'buffer_settings');
+       Hook::register('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
 }
 
 function buffer_uninstall()
 {
-       Addon::unregisterHook('hook_fork',               'addon/buffer/buffer.php', 'buffer_hook_fork');
-       Addon::unregisterHook('post_local',              'addon/buffer/buffer.php', 'buffer_post_local');
-       Addon::unregisterHook('notifier_normal',         'addon/buffer/buffer.php', 'buffer_send');
-       Addon::unregisterHook('jot_networks',            'addon/buffer/buffer.php', 'buffer_jot_nets');
-       Addon::unregisterHook('connector_settings',      'addon/buffer/buffer.php', 'buffer_settings');
-       Addon::unregisterHook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
+       Hook::unregister('hook_fork',               'addon/buffer/buffer.php', 'buffer_hook_fork');
+       Hook::unregister('post_local',              'addon/buffer/buffer.php', 'buffer_post_local');
+       Hook::unregister('notifier_normal',         'addon/buffer/buffer.php', 'buffer_send');
+       Hook::unregister('jot_networks',            'addon/buffer/buffer.php', 'buffer_jot_nets');
+       Hook::unregister('connector_settings',      'addon/buffer/buffer.php', 'buffer_settings');
+       Hook::unregister('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
 }
 
 function buffer_module()
index 91d860cd12105d793cb2bac2ab070876b24df901..d8253d98330b4177c29ca65ed434e8e77f01ed77 100644 (file)
@@ -7,17 +7,17 @@
  */
 
 use Friendica\App;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 
 function buglink_install()
 {
-       Addon::registerHook('page_end', 'addon/buglink/buglink.php', 'buglink_active');
+       Hook::register('page_end', 'addon/buglink/buglink.php', 'buglink_active');
 }
 
 function buglink_uninstall()
 {
-       Addon::unregisterHook('page_end', 'addon/buglink/buglink.php', 'buglink_active');
+       Hook::unregister('page_end', 'addon/buglink/buglink.php', 'buglink_active');
 }
 
 function buglink_active(App $a, &$b)
index 176ade85730e60ca58b73c84175aa946fbdd4fb3..f60682b048d63a7481579048818f9867e5bcf3ee 100644 (file)
@@ -5,14 +5,14 @@
  * Version: 1.0\r
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>\r
  */\r
-use Friendica\Core\Addon;\r
+use Friendica\Core\Hook;\r
 \r
 function calc_install() {\r
-       Addon::registerHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');\r
+       Hook::register('app_menu', 'addon/calc/calc.php', 'calc_app_menu');\r
 }\r
 \r
 function calc_uninstall() {\r
-       Addon::unregisterHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');\r
+       Hook::unregister('app_menu', 'addon/calc/calc.php', 'calc_app_menu');\r
 \r
 }\r
 \r
index 77dd1812a1089f69689425b6e9a0dabc25281f94..e70449af0aaf02c0387a2470400e1e099af35fc0 100644 (file)
@@ -7,8 +7,8 @@
  */
 
 use Friendica\App;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -26,9 +26,9 @@ define("CATAVATAR_SIZE", 256);
  */
 function catavatar_install()
 {
-       Addon::registerHook('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
-       Addon::registerHook('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
-       Addon::registerHook('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
+       Hook::register('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
+       Hook::register('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
+       Hook::register('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
 
        Logger::log('registered catavatar');
 }
@@ -38,9 +38,9 @@ function catavatar_install()
  */
 function catavatar_uninstall()
 {
-       Addon::unregisterHook('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
-       Addon::unregisterHook('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
+       Hook::unregister('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
+       Hook::unregister('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
+       Hook::unregister('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
 
        Logger::log('unregistered catavatar');
 }
index 1ddd29781e8864232429d433552ae375ab623d76..e95637418454c552e89343f96cf3d03646d4cdda 100644 (file)
@@ -5,14 +5,14 @@
  * Version: 1.0\r
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>\r
  */\r
-use Friendica\Core\Addon;\r
+use Friendica\Core\Hook;\r
 \r
 function convert_install() {\r
-       Addon::registerHook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');\r
+       Hook::register('app_menu', 'addon/convert/convert.php', 'convert_app_menu');\r
 }\r
 \r
 function convert_uninstall() {\r
-       Addon::unregisterHook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');\r
+       Hook::unregister('app_menu', 'addon/convert/convert.php', 'convert_app_menu');\r
 }\r
 \r
 function convert_app_menu($a,&$b) {\r
index 9d4d42e747b506c90d9a745408dbd27ab1425329..4c24007caffb05dc7b19034d398c6dc11f8409f6 100644 (file)
@@ -12,9 +12,9 @@
 require_once 'include/text.php';
 
 use Friendica\App;
-use Friendica\Core\Addon;
 use Friendica\Core\Cache;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Core\Renderer;
@@ -23,16 +23,16 @@ use Friendica\Util\Proxy as ProxyUtils;
 
 function curweather_install()
 {
-       Addon::registerHook('network_mod_init'   , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
-       Addon::registerHook('addon_settings'     , 'addon/curweather/curweather.php', 'curweather_addon_settings');
-       Addon::registerHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
+       Hook::register('network_mod_init'   , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
+       Hook::register('addon_settings'     , 'addon/curweather/curweather.php', 'curweather_addon_settings');
+       Hook::register('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
 }
 
 function curweather_uninstall()
 {
-       Addon::unregisterHook('network_mod_init'   , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
-       Addon::unregisterHook('addon_settings'     , 'addon/curweather/curweather.php', 'curweather_addon_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
+       Hook::unregister('network_mod_init'   , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
+       Hook::unregister('addon_settings'     , 'addon/curweather/curweather.php', 'curweather_addon_settings');
+       Hook::unregister('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
 }
 
 //  get the weather data from OpenWeatherMap
index b36b2774ebd22e343bf98805102c34208843d5b3..75256fffcd520866b1de1024b2bc342922e6355f 100644 (file)
@@ -11,7 +11,7 @@ require_once 'addon/diaspora/Diaspora_Connection.php';
 
 use Friendica\App;
 use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -21,24 +21,24 @@ use Friendica\Model\Queue;
 
 function diaspora_install()
 {
-       Addon::registerHook('hook_fork',               'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
-       Addon::registerHook('post_local',              'addon/diaspora/diaspora.php', 'diaspora_post_local');
-       Addon::registerHook('notifier_normal',         'addon/diaspora/diaspora.php', 'diaspora_send');
-       Addon::registerHook('jot_networks',            'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
-       Addon::registerHook('connector_settings',      'addon/diaspora/diaspora.php', 'diaspora_settings');
-       Addon::registerHook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
-       Addon::registerHook('queue_predeliver',        'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
+       Hook::register('hook_fork',               'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
+       Hook::register('post_local',              'addon/diaspora/diaspora.php', 'diaspora_post_local');
+       Hook::register('notifier_normal',         'addon/diaspora/diaspora.php', 'diaspora_send');
+       Hook::register('jot_networks',            'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
+       Hook::register('connector_settings',      'addon/diaspora/diaspora.php', 'diaspora_settings');
+       Hook::register('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
+       Hook::register('queue_predeliver',        'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
 }
 
 function diaspora_uninstall()
 {
-       Addon::unregisterHook('hook_fork',               'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
-       Addon::unregisterHook('post_local',              'addon/diaspora/diaspora.php', 'diaspora_post_local');
-       Addon::unregisterHook('notifier_normal',         'addon/diaspora/diaspora.php', 'diaspora_send');
-       Addon::unregisterHook('jot_networks',            'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
-       Addon::unregisterHook('connector_settings',      'addon/diaspora/diaspora.php', 'diaspora_settings');
-       Addon::unregisterHook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
-       Addon::unregisterHook('queue_predeliver',        'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
+       Hook::unregister('hook_fork',               'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
+       Hook::unregister('post_local',              'addon/diaspora/diaspora.php', 'diaspora_post_local');
+       Hook::unregister('notifier_normal',         'addon/diaspora/diaspora.php', 'diaspora_send');
+       Hook::unregister('jot_networks',            'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
+       Hook::unregister('connector_settings',      'addon/diaspora/diaspora.php', 'diaspora_settings');
+       Hook::unregister('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
+       Hook::unregister('queue_predeliver',        'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
 }
 
 function diaspora_jot_nets(App $a, &$b)
index cceb3ca0949873ce634073c1c30fedd869a2c932..1fdf003de7f14462de19f88762e011f230e39dab 100644 (file)
@@ -10,7 +10,7 @@
 
 use Friendica\App;
 use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -21,20 +21,20 @@ use Friendica\Util\XML;
 
 function dwpost_install()
 {
-       Addon::registerHook('post_local',              'addon/dwpost/dwpost.php', 'dwpost_post_local');
-       Addon::registerHook('notifier_normal',         'addon/dwpost/dwpost.php', 'dwpost_send');
-       Addon::registerHook('jot_networks',            'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
-       Addon::registerHook('connector_settings',      'addon/dwpost/dwpost.php', 'dwpost_settings');
-       Addon::registerHook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
+       Hook::register('post_local',              'addon/dwpost/dwpost.php', 'dwpost_post_local');
+       Hook::register('notifier_normal',         'addon/dwpost/dwpost.php', 'dwpost_send');
+       Hook::register('jot_networks',            'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
+       Hook::register('connector_settings',      'addon/dwpost/dwpost.php', 'dwpost_settings');
+       Hook::register('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
 }
 
 function dwpost_uninstall()
 {
-       Addon::unregisterHook('post_local',              'addon/dwpost/dwpost.php', 'dwpost_post_local');
-       Addon::unregisterHook('notifier_normal',         'addon/dwpost/dwpost.php', 'dwpost_send');
-       Addon::unregisterHook('jot_networks',            'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
-       Addon::unregisterHook('connector_settings',      'addon/dwpost/dwpost.php', 'dwpost_settings');
-       Addon::unregisterHook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
+       Hook::unregister('post_local',              'addon/dwpost/dwpost.php', 'dwpost_post_local');
+       Hook::unregister('notifier_normal',         'addon/dwpost/dwpost.php', 'dwpost_send');
+       Hook::unregister('jot_networks',            'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
+       Hook::unregister('connector_settings',      'addon/dwpost/dwpost.php', 'dwpost_settings');
+       Hook::unregister('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
 }
 
 function dwpost_jot_nets(App $a, &$b)
index b92f6085ff6ffdb1ed64b4169c71485a54a93075..939cbb4bd67fc8dac2a4e3b95876416aee8343ac 100644 (file)
@@ -6,7 +6,7 @@
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  * Status: Unsupported
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Util\Network;
 
 // IMPORTANT: SET THIS to your fortunate server
@@ -15,7 +15,7 @@ define('FORTUNATE_SERVER', 'hostname.com');
 
 function fortunate_install()
 {
-       Addon::registerHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
+       Hook::register('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
        if (FORTUNATE_SERVER == 'hostname.com' && is_site_admin()) {
                notice('Fortunate addon requires configuration. See README');
        }
@@ -23,7 +23,7 @@ function fortunate_install()
 
 function fortunate_uninstall()
 {
-       Addon::unregisterHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
+       Hook::unregister('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
 }
 
 
index 0e2f0fe30377cf4fe1759c541ccba58f7990b8d6..c07f072cc17069b2f1bf1176d09030b9e461d014 100644 (file)
@@ -10,8 +10,8 @@ use Friendica\App;
 use Friendica\Content\Nav;
 use Friendica\Content\Pager;
 use Friendica\Content\Widget;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Renderer;
 use Friendica\Database\DBA;
@@ -26,12 +26,12 @@ require_once 'include/text.php';
 
 function forumdirectory_install()
 {
-       Addon::registerHook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
+       Hook::register('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
 }
 
 function forumdirectory_uninstall()
 {
-       Addon::unregisterHook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
+       Hook::unregister('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
 }
 
 function forumdirectory_module()
index e0ede735decbb0a03e9674b95776338b1872581d..bbef3d9a667c1e4067c8874c7f969cfdc91092a3 100644 (file)
@@ -6,25 +6,25 @@
  * Author: Commander Zot
  *
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
 
 function fromapp_install()
 {
-       Addon::registerHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
-       Addon::registerHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
-       Addon::registerHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
+       Hook::register('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
+       Hook::register('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
+       Hook::register('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
        Logger::log("installed fromapp");
 }
 
 
 function fromapp_uninstall()
 {
-       Addon::unregisterHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
-       Addon::unregisterHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
+       Hook::unregister('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
+       Hook::unregister('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
+       Hook::unregister('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
        Logger::log("removed fromapp");
 }
 
index 35f90ac06fdf85f7b0fa28d45a48ea5b276a0c4d..28cb76022f735b988ff356873b983a8c40c205e5 100644 (file)
@@ -9,8 +9,8 @@
 
 define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
 
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -26,19 +26,19 @@ require_once 'mod/parse_url.php';
 require_once 'include/text.php';
 
 function fromgplus_install() {
-       Addon::registerHook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
-       Addon::registerHook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
-       Addon::registerHook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
+       Hook::register('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
+       Hook::register('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
+       Hook::register('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
 }
 
 function fromgplus_uninstall() {
-       Addon::unregisterHook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
-       Addon::unregisterHook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
-       Addon::unregisterHook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
+       Hook::unregister('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
+       Hook::unregister('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
+       Hook::unregister('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
 
        // Old hooks
-       Addon::unregisterHook('addon_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
+       Hook::unregister('addon_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
+       Hook::unregister('addon_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
 }
 
 function fromgplus_addon_settings(&$a,&$s) {
index abb33abb6c5b225b8eee51846e5f20e3af85bf47..77bfa8e6e9f89759d02da18dbfd18ad4f824d3a1 100644 (file)
@@ -5,9 +5,9 @@
  * Version: 0.1
  * Author: Michael Vogel <https://pirati.ca/profile/heluecht>
  */
-use Friendica\Core\Addon;
 use Friendica\Core\Cache;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
@@ -16,15 +16,15 @@ use Friendica\Util\Strings;
 
 function geocoordinates_install()
 {
-       Addon::registerHook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
-       Addon::registerHook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
+       Hook::register('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
+       Hook::register('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
 }
 
 
 function geocoordinates_uninstall()
 {
-       Addon::unregisterHook('post_local',    'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
-       Addon::unregisterHook('post_remote',    'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
+       Hook::unregister('post_local',    'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
+       Hook::unregister('post_remote',    'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
 }
 
 function geocoordinates_resolve_item(&$item)
index 91a466fc5b57ea015d0e6dd6328eadf28369ef58..7023336bcdcd2826e5a8df69fd1f71098bd65486 100644 (file)
@@ -21,8 +21,8 @@
  * system will call the name_uninstall() function.
  *
  */
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -31,7 +31,7 @@ use Friendica\Util\XML;
 
 function geonames_install() {
 
-       Addon::registerHook('load_config', 'addon/geonames/geonames.php', 'geonames_load_config');
+       Hook::register('load_config', 'addon/geonames/geonames.php', 'geonames_load_config');
 
        /**
         *
@@ -40,7 +40,7 @@ function geonames_install() {
         *
         */
 
-       Addon::registerHook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
+       Hook::register('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
 
        /**
         *
@@ -50,8 +50,8 @@ function geonames_install() {
         *
         */
 
-       Addon::registerHook('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
-       Addon::registerHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
+       Hook::register('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
+       Hook::register('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
 
        Logger::log("installed geonames");
 }
@@ -67,10 +67,10 @@ function geonames_uninstall() {
         *
         */
 
-       Addon::unregisterHook('load_config',   'addon/geonames/geonames.php', 'geonames_load_config');
-       Addon::unregisterHook('post_local',    'addon/geonames/geonames.php', 'geonames_post_hook');
-       Addon::unregisterHook('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
-       Addon::unregisterHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
+       Hook::unregister('load_config',   'addon/geonames/geonames.php', 'geonames_load_config');
+       Hook::unregister('post_local',    'addon/geonames/geonames.php', 'geonames_post_hook');
+       Hook::unregister('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
+       Hook::unregister('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
 
 
        Logger::log("removed geonames");
index f3a50705f5586c0f232ee63a1871bde90617af2b..7adf045fde3c0ae57b1f12a89f0cca6f4e46eb95 100644 (file)
@@ -7,16 +7,16 @@
  * 
  *
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
 
 function gnot_install() {
 
-       Addon::registerHook('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
-       Addon::registerHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
-       Addon::registerHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
+       Hook::register('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
+       Hook::register('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
+       Hook::register('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
 
        Logger::log("installed gnot");
 }
@@ -24,9 +24,9 @@ function gnot_install() {
 
 function gnot_uninstall() {
 
-       Addon::unregisterHook('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
-       Addon::unregisterHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
+       Hook::unregister('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
+       Hook::unregister('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
+       Hook::unregister('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
 
 
        Logger::log("removed gnot");
index f9aeefd85c901d9ce626b17ad39eb4d800b125e6..09a566e8b46b2071027cc85fe0cd678ac783b459 100644 (file)
@@ -6,20 +6,19 @@
  * Author: Michael Vogel <https://pirati.ca/profile/heluecht>
  *
  */
-use Friendica\Core\Addon;
-use Friendica\Core\Cache;
+use Friendica\Core\Hook;
 use Friendica\Core\Logger;
 
 function googlemaps_install()
 {
-       Addon::registerHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
+       Hook::register('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
 
        Logger::log("installed googlemaps");
 }
 
 function googlemaps_uninstall()
 {
-       Addon::unregisterHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
+       Hook::unregister('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
 
        Logger::log("removed googlemaps");
 }
index fea062705072adb19b84a162fcc39c3ce6c8b7b4..70e81448df8fc7de8288888b9e48876c25f10dc1 100644 (file)
@@ -8,21 +8,20 @@
 
 use Friendica\App;
 use Friendica\BaseModule;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
 use Friendica\Database\DBA;
-use Friendica\Util\Security;
 use Friendica\Util\Strings;
 
 /**
  * Installs the addon hook
  */
 function gravatar_install() {
-       Addon::registerHook('load_config',   'addon/gravatar/gravatar.php', 'gravatar_load_config');
-       Addon::registerHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
+       Hook::register('load_config',   'addon/gravatar/gravatar.php', 'gravatar_load_config');
+       Hook::register('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
 
        Logger::log("registered gravatar in avatar_lookup hook");
 }
@@ -31,8 +30,8 @@ function gravatar_install() {
  * Removes the addon hook
  */
 function gravatar_uninstall() {
-       Addon::unregisterHook('load_config',   'addon/gravatar/gravatar.php', 'gravatar_load_config');
-       Addon::unregisterHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
+       Hook::unregister('load_config',   'addon/gravatar/gravatar.php', 'gravatar_load_config');
+       Hook::unregister('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
 
        Logger::log("unregistered gravatar in avatar_lookup hook");
 }
index cf56dbecd76e302f6287a6b3a32b1d2f8288b8e9..47768df2d7a5f25233e6c2198964c5c553d97785 100644 (file)
@@ -5,15 +5,15 @@
  * Version: 1.0
  * Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
 
 function group_text_install() {
 
-       Addon::registerHook('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
-       Addon::registerHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
+       Hook::register('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
+       Hook::register('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
 
        Logger::log("installed group_text");
 }
@@ -21,8 +21,8 @@ function group_text_install() {
 
 function group_text_uninstall() {
 
-       Addon::unregisterHook('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
+       Hook::unregister('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
+       Hook::unregister('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
 
 
        Logger::log("removed group_text");
index 8d05453b6b6d7ef219748d82da12ae4dccc905c6..258cb4ad156f0ca29cafcfc79db39b0c5514eb30 100644 (file)
@@ -7,18 +7,18 @@
  */
 
 use Friendica\App;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 
 function highlightjs_install()
 {
-       Addon::registerHook('head'  , __FILE__, 'highlightjs_head');
-       Addon::registerHook('footer', __FILE__, 'highlightjs_footer');
+       Hook::register('head'  , __FILE__, 'highlightjs_head');
+       Hook::register('footer', __FILE__, 'highlightjs_footer');
 }
 
 function highlightjs_uninstall()
 {
-       Addon::unregisterHook('head'  , __FILE__, 'highlightjs_head');
-       Addon::unregisterHook('footer', __FILE__, 'highlightjs_footer');
+       Hook::unregister('head'  , __FILE__, 'highlightjs_head');
+       Hook::unregister('footer', __FILE__, 'highlightjs_footer');
 }
 
 function highlightjs_head(App $a, &$b)
index 50fa119c9a3a87fce429319b9abd6cbaa8a8cf62..a18914994a0b705307b14c77104ccdd127a48856 100644 (file)
@@ -11,7 +11,7 @@ require_once 'include/items.php';
 require_once 'include/text.php';
 
 use Friendica\App;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -22,14 +22,14 @@ use Friendica\Util\Strings;
 
 function ifttt_install()
 {
-       Addon::registerHook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
-       Addon::registerHook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
+       Hook::register('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
+       Hook::register('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
 }
 
 function ifttt_uninstall()
 {
-       Addon::unregisterHook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
-       Addon::unregisterHook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
+       Hook::unregister('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
+       Hook::unregister('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
 }
 
 function ifttt_module()
index dcb8f4bf872eb8ac6c9258ded3881ee33832fc97..b3ae2ed9a948549f40c8aff81adca78842b69806 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -19,20 +19,20 @@ use Friendica\Util\XML;
 
 function ijpost_install()
 {
-       Addon::registerHook('post_local',           'addon/ijpost/ijpost.php', 'ijpost_post_local');
-       Addon::registerHook('notifier_normal',      'addon/ijpost/ijpost.php', 'ijpost_send');
-       Addon::registerHook('jot_networks',         'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
-       Addon::registerHook('connector_settings',      'addon/ijpost/ijpost.php', 'ijpost_settings');
-       Addon::registerHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
+       Hook::register('post_local',           'addon/ijpost/ijpost.php', 'ijpost_post_local');
+       Hook::register('notifier_normal',      'addon/ijpost/ijpost.php', 'ijpost_send');
+       Hook::register('jot_networks',         'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
+       Hook::register('connector_settings',      'addon/ijpost/ijpost.php', 'ijpost_settings');
+       Hook::register('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
 }
 
 function ijpost_uninstall()
 {
-       Addon::unregisterHook('post_local',       'addon/ijpost/ijpost.php', 'ijpost_post_local');
-       Addon::unregisterHook('notifier_normal',  'addon/ijpost/ijpost.php', 'ijpost_send');
-       Addon::unregisterHook('jot_networks',     'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
-       Addon::unregisterHook('connector_settings',      'addon/ijpost/ijpost.php', 'ijpost_settings');
-       Addon::unregisterHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
+       Hook::unregister('post_local',       'addon/ijpost/ijpost.php', 'ijpost_post_local');
+       Hook::unregister('notifier_normal',  'addon/ijpost/ijpost.php', 'ijpost_send');
+       Hook::unregister('jot_networks',     'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
+       Hook::unregister('connector_settings',      'addon/ijpost/ijpost.php', 'ijpost_settings');
+       Hook::unregister('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
 }
 
 function ijpost_jot_nets(&$a, &$b)
index c5a1c98dbe7a91eaa0be627d7f783bf3cd0efa56..b68c0e2eae45d469f6101d853a09115a3b76e4d4 100644 (file)
@@ -8,8 +8,8 @@
  */
 
 use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
@@ -17,16 +17,16 @@ use Friendica\Util\Proxy as ProxyUtils;
 use Friendica\Util\Strings;
 
 function impressum_install() {
-       Addon::registerHook('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
-    Addon::registerHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
-    Addon::registerHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
+       Hook::register('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
+    Hook::register('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
+    Hook::register('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
     Logger::log("installed impressum Addon");
 }
 
 function impressum_uninstall() {
-       Addon::unregisterHook('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
-    Addon::unregisterHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
-    Addon::unregisterHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
+       Hook::unregister('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
+    Hook::unregister('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
+    Hook::unregister('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
     Logger::log("uninstalled impressum Addon");
 }
 
index 3106a2fe6b3c17e23aa788c7876701cc11c0da42..a71fe6518f2bf69f001849367da57a932ef18f93 100644 (file)
@@ -5,17 +5,17 @@
 * Version: 1.0
 * Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
 */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 
 function infiniteimprobabilitydrive_install()
 {
-       Addon::registerHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
+       Hook::register('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
 }
 
 function infiniteimprobabilitydrive_uninstall()
 {
-       Addon::unregisterHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
+       Hook::unregister('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
 }
 
 function infiniteimprobabilitydrive_app_menu($a, &$b)
index 2677dc756b10123435c8ed83d36102f3161b0e64..eab755c8ee5fbdc2b35e64a4fd79d2a35f7fc627 100644 (file)
@@ -6,21 +6,21 @@
 * Author: tony baldwin <https://free-haven.org/profile/tony>
 * Author: Tobias Diekershoff <https://f.diekershoff.de/u/tobias>
 */
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Core\Renderer;
 
 function irc_install() {
-       Addon::registerHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
-       Addon::registerHook('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
-       Addon::registerHook('addon_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post');
+       Hook::register('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
+       Hook::register('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
+       Hook::register('addon_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post');
 }
 
 function irc_uninstall() {
-       Addon::unregisterHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
-       Addon::unregisterHook('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
+       Hook::unregister('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
+       Hook::unregister('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
 
 }
 
index 4530556568b2b18c3c719e363885d94d646cd716..13e0cf42edb51f1affebdd921bc42fe2dfc46446 100644 (file)
@@ -63,8 +63,8 @@
  */
 
 use Friendica\App;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -75,16 +75,16 @@ use Friendica\Util\Network;
 
 function jappixmini_install()
 {
-       Addon::registerHook('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
-       Addon::registerHook('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
+       Hook::register('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
+       Hook::register('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
 
-       Addon::registerHook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
-       Addon::registerHook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
+       Hook::register('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
+       Hook::register('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
 
-       Addon::registerHook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
+       Hook::register('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
 
        // Jappix source download as required by AGPL
-       Addon::registerHook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
+       Hook::register('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
 
        // set standard configuration
        $info_text = Config::get("jappixmini", "infotext");
@@ -109,15 +109,15 @@ function jappixmini_install()
 
 function jappixmini_uninstall()
 {
-       Addon::unregisterHook('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
+       Hook::unregister('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
+       Hook::unregister('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
 
-       Addon::unregisterHook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
-       Addon::unregisterHook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
+       Hook::unregister('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
+       Hook::unregister('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
 
-       Addon::unregisterHook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
+       Hook::unregister('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
 
-       Addon::unregisterHook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
+       Hook::unregister('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
 }
 
 function jappixmini_addon_admin(App $a, &$o)
index 705d47d98feadedbb0f7ff8409d73c486c1aa5de..b115e961eec3fddce1439b9bddd16d462e9c5619 100644 (file)
  * Module Author: Chris Case
  *
  */
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 
 function js_upload_install() {
-       Addon::registerHook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
-       Addon::registerHook('photo_post_init',   'addon/js_upload/js_upload.php', 'js_upload_post_init');
-       Addon::registerHook('photo_post_file',   'addon/js_upload/js_upload.php', 'js_upload_post_file');
-       Addon::registerHook('photo_post_end',    'addon/js_upload/js_upload.php', 'js_upload_post_end');
+       Hook::register('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
+       Hook::register('photo_post_init',   'addon/js_upload/js_upload.php', 'js_upload_post_init');
+       Hook::register('photo_post_file',   'addon/js_upload/js_upload.php', 'js_upload_post_file');
+       Hook::register('photo_post_end',    'addon/js_upload/js_upload.php', 'js_upload_post_end');
 }
 
 
 function js_upload_uninstall() {
-       Addon::unregisterHook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
-       Addon::unregisterHook('photo_post_init',   'addon/js_upload/js_upload.php', 'js_upload_post_init');
-       Addon::unregisterHook('photo_post_file',   'addon/js_upload/js_upload.php', 'js_upload_post_file');
-       Addon::unregisterHook('photo_post_end',    'addon/js_upload/js_upload.php', 'js_upload_post_end');
+       Hook::unregister('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
+       Hook::unregister('photo_post_init',   'addon/js_upload/js_upload.php', 'js_upload_post_init');
+       Hook::unregister('photo_post_file',   'addon/js_upload/js_upload.php', 'js_upload_post_file');
+       Hook::unregister('photo_post_end',    'addon/js_upload/js_upload.php', 'js_upload_post_end');
 }
 
 
index 97871c3a363021d369860419230ff0de56094483..8f92daf75e9d3d56a704dd96fe8d88500a1d56f9 100644 (file)
@@ -9,7 +9,7 @@
  *
  *"My body was my sacrifice... for my magic. This damage is permanent." - Raistlin Majere
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -23,7 +23,7 @@ function krynn_install() {
         *
         */
 
-       Addon::registerHook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
+       Hook::register('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
 
        /**
         *
@@ -33,8 +33,8 @@ function krynn_install() {
         *
         */
 
-       Addon::registerHook('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
-       Addon::registerHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
+       Hook::register('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
+       Hook::register('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
 
        Logger::log("installed krynn");
 }
@@ -50,9 +50,9 @@ function krynn_uninstall() {
         *
         */
 
-       Addon::unregisterHook('post_local',    'addon/krynn/krynn.php', 'krynn_post_hook');
-       Addon::unregisterHook('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
+       Hook::unregister('post_local',    'addon/krynn/krynn.php', 'krynn_post_hook');
+       Hook::unregister('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
+       Hook::unregister('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
 
 
        Logger::log("removed krynn");
index 512ac840a3eed46b3db22a10e7cac08b8264cd6d..950219698a58a722706e33bc29e19b4f2f37d2a9 100644 (file)
@@ -9,7 +9,7 @@
 
 use Friendica\App;
 use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Core\Renderer;
@@ -21,17 +21,17 @@ use Friendica\Core\Renderer;
 
 function langfilter_install()
 {
-       Addon::registerHook('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter', 10);
-       Addon::registerHook('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
-       Addon::registerHook('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
+       Hook::register('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter', 10);
+       Hook::register('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
+       Hook::register('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
 }
 
 function langfilter_uninstall()
 {
-       Addon::unregisterHook('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter');
-       Addon::unregisterHook('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body');
-       Addon::unregisterHook('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
+       Hook::unregister('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter');
+       Hook::unregister('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body');
+       Hook::unregister('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
+       Hook::unregister('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
 }
 
 /* The settings
index 77d963c07f99eb0659d3709d9341f556a1e53106..e564bbe63a6ac18c467c73c096b5b5d3b3304a67 100644 (file)
  *
  * ...etc.
  */
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\Logger;
 use Friendica\Model\User;
 
 function ldapauth_install()
 {
-       Addon::registerHook('load_config',  'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
-       Addon::registerHook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
+       Hook::register('load_config',  'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
+       Hook::register('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
 }
 
 function ldapauth_uninstall()
 {
-       Addon::unregisterHook('load_config',  'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
-       Addon::unregisterHook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
+       Hook::unregister('load_config',  'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
+       Hook::unregister('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
 }
 
 function ldapauth_load_config(\Friendica\App $a)
index 020c3af3bcad65e5ece625415ec1bb21106bc39c..b4c9488f6da1754da295224aa1826fbb750a1a4c 100644 (file)
@@ -5,22 +5,22 @@
  * Version: 0.1
  * Author: Michael Vogel <https://pirati.ca/profile/heluecht>
  */
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\Logger;
 use Friendica\Util\Network;
 
 function leistungsschutzrecht_install() {
-       Addon::registerHook('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
-       Addon::registerHook('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
-       Addon::registerHook('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
+       Hook::register('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
+       Hook::register('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
+       Hook::register('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
 }
 
 
 function leistungsschutzrecht_uninstall() {
-       Addon::unregisterHook('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
-       Addon::unregisterHook('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
-       Addon::unregisterHook('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
+       Hook::unregister('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
+       Hook::unregister('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
+       Hook::unregister('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
 }
 
 function leistungsschutzrecht_getsiteinfo($a, &$siteinfo) {
index d5aa97e5a866a243625f538f0e8a92d37e34b106..a864b9ebd78a8f763bc6522910bd8b67ea1a5758 100644 (file)
@@ -8,7 +8,7 @@
 
 use Friendica\App;
 use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -17,22 +17,22 @@ use Friendica\Util\Network;
 
 function libertree_install()
 {
-       Addon::registerHook('hook_fork',            'addon/libertree/libertree.php', 'libertree_hook_fork');
-       Addon::registerHook('post_local',           'addon/libertree/libertree.php', 'libertree_post_local');
-       Addon::registerHook('notifier_normal',      'addon/libertree/libertree.php', 'libertree_send');
-       Addon::registerHook('jot_networks',         'addon/libertree/libertree.php', 'libertree_jot_nets');
-       Addon::registerHook('connector_settings',      'addon/libertree/libertree.php', 'libertree_settings');
-       Addon::registerHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
+       Hook::register('hook_fork',            'addon/libertree/libertree.php', 'libertree_hook_fork');
+       Hook::register('post_local',           'addon/libertree/libertree.php', 'libertree_post_local');
+       Hook::register('notifier_normal',      'addon/libertree/libertree.php', 'libertree_send');
+       Hook::register('jot_networks',         'addon/libertree/libertree.php', 'libertree_jot_nets');
+       Hook::register('connector_settings',      'addon/libertree/libertree.php', 'libertree_settings');
+       Hook::register('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
 }
 
 function libertree_uninstall()
 {
-       Addon::unregisterHook('hook_fork',        'addon/libertree/libertree.php', 'libertree_hook_fork');
-       Addon::unregisterHook('post_local',       'addon/libertree/libertree.php', 'libertree_post_local');
-       Addon::unregisterHook('notifier_normal',  'addon/libertree/libertree.php', 'libertree_send');
-       Addon::unregisterHook('jot_networks',     'addon/libertree/libertree.php', 'libertree_jot_nets');
-       Addon::unregisterHook('connector_settings',      'addon/libertree/libertree.php', 'libertree_settings');
-       Addon::unregisterHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
+       Hook::unregister('hook_fork',        'addon/libertree/libertree.php', 'libertree_hook_fork');
+       Hook::unregister('post_local',       'addon/libertree/libertree.php', 'libertree_post_local');
+       Hook::unregister('notifier_normal',  'addon/libertree/libertree.php', 'libertree_send');
+       Hook::unregister('jot_networks',     'addon/libertree/libertree.php', 'libertree_jot_nets');
+       Hook::unregister('connector_settings',      'addon/libertree/libertree.php', 'libertree_settings');
+       Hook::unregister('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
 }
 
 function libertree_jot_nets(&$a,&$b) {
index d6ccb7185dcdbf4b5a8ad16b033c0fd1ad303916..232278a99561e5f27f53dbc485c7d0452d1c3980 100644 (file)
@@ -8,13 +8,12 @@
 
 use Friendica\App;
 use Friendica\BaseModule;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
 use Friendica\Database\DBA;
-use Friendica\Util\Security;
 use Friendica\Util\Strings;
 
 /**
@@ -22,8 +21,8 @@ use Friendica\Util\Strings;
  */
 function libravatar_install()
 {
-       Addon::registerHook('load_config',   'addon/libravatar/libravatar.php', 'libravatar_load_config');
-       Addon::registerHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
+       Hook::register('load_config',   'addon/libravatar/libravatar.php', 'libravatar_load_config');
+       Hook::register('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
        Logger::log("registered libravatar in avatar_lookup hook");
 }
 
@@ -32,8 +31,8 @@ function libravatar_install()
  */
 function libravatar_uninstall()
 {
-       Addon::unregisterHook('load_config',   'addon/libravatar/libravatar.php', 'libravatar_load_config');
-       Addon::unregisterHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
+       Hook::unregister('load_config',   'addon/libravatar/libravatar.php', 'libravatar_load_config');
+       Hook::unregister('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
        Logger::log("unregistered libravatar in avatar_lookup hook");
 }
 
index dc0c0fd6089406c0cf31eecafe547df300fa9a36..e8977b5158c975ef624ed5dbafae06c980413978 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -18,19 +18,19 @@ use Friendica\Util\Network;
 use Friendica\Util\XML;
 
 function ljpost_install() {
-    Addon::registerHook('post_local',           'addon/ljpost/ljpost.php', 'ljpost_post_local');
-    Addon::registerHook('notifier_normal',      'addon/ljpost/ljpost.php', 'ljpost_send');
-    Addon::registerHook('jot_networks',         'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
-    Addon::registerHook('connector_settings',      'addon/ljpost/ljpost.php', 'ljpost_settings');
-    Addon::registerHook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
+    Hook::register('post_local',           'addon/ljpost/ljpost.php', 'ljpost_post_local');
+    Hook::register('notifier_normal',      'addon/ljpost/ljpost.php', 'ljpost_send');
+    Hook::register('jot_networks',         'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
+    Hook::register('connector_settings',      'addon/ljpost/ljpost.php', 'ljpost_settings');
+    Hook::register('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
 
 }
 function ljpost_uninstall() {
-    Addon::unregisterHook('post_local',       'addon/ljpost/ljpost.php', 'ljpost_post_local');
-    Addon::unregisterHook('notifier_normal',  'addon/ljpost/ljpost.php', 'ljpost_send');
-    Addon::unregisterHook('jot_networks',     'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
-    Addon::unregisterHook('connector_settings',      'addon/ljpost/ljpost.php', 'ljpost_settings');
-    Addon::unregisterHook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
+    Hook::unregister('post_local',       'addon/ljpost/ljpost.php', 'ljpost_post_local');
+    Hook::unregister('notifier_normal',  'addon/ljpost/ljpost.php', 'ljpost_send');
+    Hook::unregister('jot_networks',     'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
+    Hook::unregister('connector_settings',      'addon/ljpost/ljpost.php', 'ljpost_settings');
+    Hook::unregister('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
 
 }
 
index 6d772a9373cb3871fe6d7a1685d2788712f27859..d9772037b3f8c9e3a9625fbc563fc71ad80ced83 100644 (file)
@@ -6,14 +6,14 @@
  * Version: 1.0\r
  * Author: Holger Froese\r
  */\r
-use Friendica\Core\Addon;\r
+use Friendica\Core\Hook;\r
 \r
 function mahjongg_install() {\r
-    Addon::registerHook('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');\r
+    Hook::register('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');\r
 }\r
 \r
 function mahjongg_uninstall() {\r
-    Addon::unregisterHook('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');\r
+    Hook::unregister('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');\r
 \r
 }\r
 \r
index 6b693f6c0676b6903ee6f15ce0497e36162a9ffd..b00c72ed677ce771251a5c150938b553ade109fc 100644 (file)
@@ -7,8 +7,8 @@
  */
 
 use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -18,11 +18,11 @@ use Friendica\Util\Network;
 use Friendica\Model\Item;
 
 function mailstream_install() {
-       Addon::registerHook('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings');
-       Addon::registerHook('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post');
-       Addon::registerHook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
-       Addon::registerHook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
-       Addon::registerHook('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
+       Hook::register('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings');
+       Hook::register('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post');
+       Hook::register('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
+       Hook::register('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
+       Hook::register('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
 
        if (Config::get('mailstream', 'dbversion') == '0.1') {
                q('ALTER TABLE `mailstream_item` DROP INDEX `uid`');
@@ -59,16 +59,16 @@ function mailstream_install() {
 }
 
 function mailstream_uninstall() {
-       Addon::unregisterHook('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post');
-       Addon::unregisterHook('post_local', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
-       Addon::unregisterHook('post_remote', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
-       Addon::unregisterHook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
-       Addon::unregisterHook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
-       Addon::unregisterHook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
-       Addon::unregisterHook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
-       Addon::unregisterHook('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
-       Addon::unregisterHook('incoming_mail', 'addon/mailstream/mailstream.php', 'mailstream_incoming_mail');
+       Hook::unregister('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings');
+       Hook::unregister('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post');
+       Hook::unregister('post_local', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
+       Hook::unregister('post_remote', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
+       Hook::unregister('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
+       Hook::unregister('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
+       Hook::unregister('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
+       Hook::unregister('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
+       Hook::unregister('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
+       Hook::unregister('incoming_mail', 'addon/mailstream/mailstream.php', 'mailstream_incoming_mail');
 }
 
 function mailstream_module() {}
index 1da12dc8b25792dbe482d0d75ff5df9217886d0a..c7e9df6031e6206d7671184479dca9692e697157 100644 (file)
 
 use Friendica\App;
 use Friendica\Content\Smilies;
-use Friendica\Core\Addon;
 use Friendica\Core\Cache;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\Protocol;
 use Friendica\Util\Network;
 use Friendica\Util\Proxy as ProxyUtils;
 
 function mastodoncustomemojis_install()
 {
-       Addon::registerHook('put_item_in_cache',  __FILE__, 'mastodoncustomemojis_put_item_in_cache');
-       Addon::registerHook('network_mod_init',   __FILE__, 'mastodoncustomemojis_css_hook');
-       Addon::registerHook('display_mod_init',   __FILE__, 'mastodoncustomemojis_css_hook');
-       Addon::registerHook('search_mod_init',    __FILE__, 'mastodoncustomemojis_css_hook');
-       Addon::registerHook('community_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
-       Addon::registerHook('contacts_mod_init',  __FILE__, 'mastodoncustomemojis_css_hook');
+       Hook::register('put_item_in_cache',  __FILE__, 'mastodoncustomemojis_put_item_in_cache');
+       Hook::register('network_mod_init',   __FILE__, 'mastodoncustomemojis_css_hook');
+       Hook::register('display_mod_init',   __FILE__, 'mastodoncustomemojis_css_hook');
+       Hook::register('search_mod_init',    __FILE__, 'mastodoncustomemojis_css_hook');
+       Hook::register('community_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
+       Hook::register('contacts_mod_init',  __FILE__, 'mastodoncustomemojis_css_hook');
 }
 
 function mastodoncustomemojis_uninstall()
 {
-       Addon::unregisterHook('put_item_in_cache',  __FILE__, 'mastodoncustomemojis_put_item_in_cache');
-       Addon::unregisterHook('network_mod_init',   __FILE__, 'mastodoncustomemojis_css_hook');
-       Addon::unregisterHook('display_mod_init',   __FILE__, 'mastodoncustomemojis_css_hook');
-       Addon::unregisterHook('search_mod_init',    __FILE__, 'mastodoncustomemojis_css_hook');
-       Addon::unregisterHook('community_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
-       Addon::unregisterHook('contacts_mod_init',  __FILE__, 'mastodoncustomemojis_css_hook');
+       Hook::unregister('put_item_in_cache',  __FILE__, 'mastodoncustomemojis_put_item_in_cache');
+       Hook::unregister('network_mod_init',   __FILE__, 'mastodoncustomemojis_css_hook');
+       Hook::unregister('display_mod_init',   __FILE__, 'mastodoncustomemojis_css_hook');
+       Hook::unregister('search_mod_init',    __FILE__, 'mastodoncustomemojis_css_hook');
+       Hook::unregister('community_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
+       Hook::unregister('contacts_mod_init',  __FILE__, 'mastodoncustomemojis_css_hook');
 }
 
 function mastodoncustomemojis_css_hook(App $a)
index ca073e53d0f191a61edb297722d411e09d05da46..6e80d68f6f987984cd57e6f44b5f5950fb79cdb3 100644 (file)
@@ -9,28 +9,28 @@
  */
 
 use Friendica\App;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Core\Renderer;
 
 function mathjax_install()
 {
-       Addon::registerHook('footer'             , __FILE__, 'mathjax_footer');
-       Addon::registerHook('addon_settings'     , __FILE__, 'mathjax_settings');
-       Addon::registerHook('addon_settings_post', __FILE__, 'mathjax_settings_post');
+       Hook::register('footer'             , __FILE__, 'mathjax_footer');
+       Hook::register('addon_settings'     , __FILE__, 'mathjax_settings');
+       Hook::register('addon_settings_post', __FILE__, 'mathjax_settings_post');
 }
 
 function mathjax_uninstall()
 {
-       Addon::unregisterHook('footer'             , __FILE__, 'mathjax_footer');
-       Addon::unregisterHook('addon_settings'     , __FILE__, 'mathjax_settings');
-       Addon::unregisterHook('addon_settings_post', __FILE__, 'mathjax_settings_post');
+       Hook::unregister('footer'             , __FILE__, 'mathjax_footer');
+       Hook::unregister('addon_settings'     , __FILE__, 'mathjax_settings');
+       Hook::unregister('addon_settings_post', __FILE__, 'mathjax_settings_post');
 
        // Legacy hooks
-       Addon::unregisterHook('load_config'        , __FILE__, 'mathjax_load_config');
-       Addon::unregisterHook('page_header'        , __FILE__, 'mathjax_page_header');
-       Addon::unregisterHook('template_vars'      , __FILE__, 'mathjax_template_vars');
+       Hook::unregister('load_config'        , __FILE__, 'mathjax_load_config');
+       Hook::unregister('page_header'        , __FILE__, 'mathjax_page_header');
+       Hook::unregister('template_vars'      , __FILE__, 'mathjax_template_vars');
 }
 
 function mathjax_settings_post($a)
index c11f9b5304750a7c35453fe49b19473bafb888f2..32edac2701fc128759dc8e78e875a07af66084ce 100644 (file)
@@ -7,18 +7,18 @@
  * Status: Unsupported
  */
 
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Util\DateTimeFormat;
 
 function membersince_install()
 {
-       Addon::registerHook('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
+       Hook::register('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
 }
 
 function membersince_uninstall()
 {
-       Addon::unregisterHook('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
+       Hook::unregister('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
 }
 
 function membersince_display(Friendica\App $a, &$b)
index 3ab7eac16e66c1630032965afa5c6ba82ad72670..dea8be1505a16fb59de8b4ada6539049b2f9e643 100644 (file)
@@ -8,26 +8,25 @@
  *
  */
 
-use Friendica\Core\Addon;
-use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 
 function morechoice_install() {
 
-       Addon::registerHook('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
-       Addon::registerHook('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
-       Addon::registerHook('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
+       Hook::register('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
+       Hook::register('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
+       Hook::register('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
 }
 
 
 function morechoice_uninstall() {
 
-       Addon::unregisterHook('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
-       Addon::unregisterHook('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
-       Addon::unregisterHook('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
+       Hook::unregister('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
+       Hook::unregister('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
+       Hook::unregister('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
 
 // We need to leave this here for a while, because we now have a situation where people can end up with an orphaned hook.
-       Addon::unregisterHook('poke_verbs', 'addon/morechoice/morechoice.php', 'morechoice_poke_verbs');
+       Hook::unregister('poke_verbs', 'addon/morechoice/morechoice.php', 'morechoice_poke_verbs');
 
 }
 
index e0caaa5221c5a1435394d7c6c80e9f07a27bfa33..32c9c03f0e955f483c2c84d52678c8fbd47ee3aa 100644 (file)
@@ -6,17 +6,17 @@
  * Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
  *
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 
 function morepokes_install()
 {
-         Addon::registerHook('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
+         Hook::register('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
 }
 
 function morepokes_uninstall()
 {
-         Addon::unregisterHook('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
+         Hook::unregister('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
 }
 
 function morepokes_poke_verbs($a, &$b)
index f6a717fc8b27cbb74ef0ffc517abbebec9aee03c..cb330981acc5b248243907c30cfa652069e435f1 100644 (file)
@@ -7,14 +7,14 @@
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  * Status: Unsupported
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 
 function namethingy_install() {
-    Addon::registerHook('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
+    Hook::register('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
 }
 
 function namethingy_uninstall() {
-    Addon::unregisterHook('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
+    Hook::unregister('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
 
 }
 
index 4c0cfc3bc7f4d55896c061c539d194cb8312788d..c8d1ccf9ac4efab7b65e02e2bdfad2a95a80785a 100644 (file)
@@ -7,8 +7,8 @@
  ***/
 
 use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
@@ -16,13 +16,13 @@ use Friendica\Util\Strings;
 
 function newmemberwidget_install()
 {
-       Addon::registerHook( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
+       Hook::register( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
        Logger::log('newmemberwidget installed');
 }
 
 function newmemberwidget_uninstall()
 {
-       Addon::unregisterHook( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
+       Hook::unregister( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
 }
 
 function newmemberwidget_network_mod_init ($a, $b)
index adba95c5c7a1d04b1d206c6dc619c58da0bc288d..d8d6b2acec11da7ea594ae9b403559a01c45fb3a 100644 (file)
@@ -7,20 +7,20 @@
  * Status: Unsupported
  *
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 
 function notimeline_install()
 {
-       Addon::registerHook('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
-       Addon::registerHook('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
+       Hook::register('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
+       Hook::register('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
 }
 
 function notimeline_uninstall()
 {
-       Addon::unregisterHook('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
+       Hook::unregister('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
+       Hook::unregister('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
 }
 
 function notimeline_settings_post($a, $post)
index 9836a056ddc801375ef79427f8f47c166e641011..b9240103c2dfdb25abe8eac9efbe386b034da5f9 100644 (file)
@@ -7,23 +7,23 @@
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  *
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 
 function nsfw_install()
 {
-       Addon::registerHook('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter', 10);
-       Addon::registerHook('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
-       Addon::registerHook('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
+       Hook::register('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter', 10);
+       Hook::register('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
+       Hook::register('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
 }
 
 function nsfw_uninstall()
 {
-       Addon::unregisterHook('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter');
-       Addon::unregisterHook('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body');
-       Addon::unregisterHook('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
+       Hook::unregister('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter');
+       Hook::unregister('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body');
+       Hook::unregister('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
+       Hook::unregister('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
 }
 
 // This function isn't perfect and isn't trying to preserve the html structure - it's just a
index 5bdc264c9ae77b9b9197c048766124433c28ccd7..8bb4e74773528377f6b5b91be92d76a429ccf1bf 100644 (file)
@@ -5,15 +5,15 @@
  * Version: 1.0
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
 
 function numfriends_install() {
 
-       Addon::registerHook('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
-       Addon::registerHook('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
+       Hook::register('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
+       Hook::register('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
 
        Logger::log("installed numfriends");
 }
@@ -21,8 +21,8 @@ function numfriends_install() {
 
 function numfriends_uninstall() {
 
-       Addon::unregisterHook('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
+       Hook::unregister('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
+       Hook::unregister('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
 
 
        Logger::log("removed numfriends");
index e4863e9b464ab9106352f08d516a4e78e0a1d2b8..c3982ec5bc7c765b23eff6c34399a87f873609b3 100644 (file)
@@ -8,9 +8,9 @@
  * Author: Klaus Weidenbach
  *
  */
-use Friendica\Core\Addon;
 use Friendica\Core\Cache;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
@@ -25,24 +25,24 @@ const OSM_MARKER = 0;
 
 function openstreetmap_install()
 {
-       Addon::registerHook('load_config',     'addon/openstreetmap/openstreetmap.php', 'openstreetmap_load_config');
-       Addon::registerHook('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
-       Addon::registerHook('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
-       Addon::registerHook('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
-       Addon::registerHook('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates');
-       Addon::registerHook('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
+       Hook::register('load_config',     'addon/openstreetmap/openstreetmap.php', 'openstreetmap_load_config');
+       Hook::register('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
+       Hook::register('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
+       Hook::register('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
+       Hook::register('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates');
+       Hook::register('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
 
        Logger::log("installed openstreetmap");
 }
 
 function openstreetmap_uninstall()
 {
-       Addon::unregisterHook('load_config',     'addon/openstreetmap/openstreetmap.php', 'openstreetmap_load_config');
-       Addon::unregisterHook('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
-       Addon::unregisterHook('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
-       Addon::unregisterHook('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
-       Addon::unregisterHook('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates');
-       Addon::unregisterHook('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
+       Hook::unregister('load_config',     'addon/openstreetmap/openstreetmap.php', 'openstreetmap_load_config');
+       Hook::unregister('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
+       Hook::unregister('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
+       Hook::unregister('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
+       Hook::unregister('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates');
+       Hook::unregister('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
 
        Logger::log("removed openstreetmap");
 }
index 5b59064a7ca9dcf3b7e2e95dfee3d7a0511c1eeb..2ec925094731c7992d7d7bcd5bc4359fd151ec3b 100644 (file)
@@ -9,24 +9,25 @@
  */
 use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Renderer;
 
 function pageheader_install() {
-    Addon::registerHook('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
-       Addon::registerHook('addon_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
-       Addon::registerHook('addon_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
+    Hook::register('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
+       Hook::register('addon_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
+       Hook::register('addon_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
 
 }
 
 
 function pageheader_uninstall() {
-    Addon::unregisterHook('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
-       Addon::unregisterHook('addon_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
+    Hook::unregister('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
+       Hook::unregister('addon_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
+       Hook::unregister('addon_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
 
        // hook moved, uninstall the old one if still there. 
-    Addon::unregisterHook('page_header', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
+    Hook::unregister('page_header', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
 
 }
 
index 3e3144fbcdd2cd91bb7f85ce341544aa2fdde63c..fa04413ecdb255003bf273f443ddfea65b96bb92 100644 (file)
  *     about http/https but beware to put the trailing / at the end of your
  *     setting.
  */
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
 use Friendica\Util\Strings;
 
 function piwik_install() {
-       Addon::registerHook('load_config', 'addon/piwik/piwik.php', 'piwik_load_config');
-       Addon::registerHook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
+       Hook::register('load_config', 'addon/piwik/piwik.php', 'piwik_load_config');
+       Hook::register('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
 
        Logger::log("installed piwik addon");
 }
 
 function piwik_uninstall() {
-       Addon::unregisterHook('load_config', 'addon/piwik/piwik.php', 'piwik_load_config');
-       Addon::unregisterHook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
+       Hook::unregister('load_config', 'addon/piwik/piwik.php', 'piwik_load_config');
+       Hook::unregister('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
 
        Logger::log("uninstalled piwik addon");
 }
index 90b14726ee3e23555a3856cc26144b7703d91496..48ba5767d6d434123d3969bdd253b3770e5f5462 100644 (file)
@@ -6,7 +6,7 @@
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  * Author: Tony Baldwin <https://free-haven.org/profile/tony>
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -20,7 +20,7 @@ function planets_install() {
         *
         */
 
-       Addon::registerHook('post_local', 'addon/planets/planets.php', 'planets_post_hook');
+       Hook::register('post_local', 'addon/planets/planets.php', 'planets_post_hook');
 
        /**
         *
@@ -30,8 +30,8 @@ function planets_install() {
         *
         */
 
-       Addon::registerHook('addon_settings', 'addon/planets/planets.php', 'planets_settings');
-       Addon::registerHook('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
+       Hook::register('addon_settings', 'addon/planets/planets.php', 'planets_settings');
+       Hook::register('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
 
        Logger::log("installed planets");
 }
@@ -47,9 +47,9 @@ function planets_uninstall() {
         *
         */
 
-       Addon::unregisterHook('post_local',    'addon/planets/planets.php', 'planets_post_hook');
-       Addon::unregisterHook('addon_settings', 'addon/planets/planets.php', 'planets_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
+       Hook::unregister('post_local',    'addon/planets/planets.php', 'planets_post_hook');
+       Hook::unregister('addon_settings', 'addon/planets/planets.php', 'planets_settings');
+       Hook::unregister('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
 
 
        Logger::log("removed planets");
index 4fd5a6c30e50033f63ff84e2b97af168e51b30cf..8a4378bc86f3ca68c5ad2359ee6da345af23cac7 100644 (file)
@@ -7,20 +7,20 @@
  *         Hauke Altmann <https://snarl.de/profile/tugelblend>
  *
  */
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 
 function pledgie_install() { 
-       Addon::registerHook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active'); 
-       Addon::registerHook('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
-       Addon::registerHook('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
+       Hook::register('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
+       Hook::register('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
+       Hook::register('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
 }
 
 function pledgie_uninstall() { 
-       Addon::unregisterHook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
-       Addon::unregisterHook('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
+       Hook::unregister('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
+       Hook::unregister('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
+       Hook::unregister('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
 }
 
 function pledgie_addon_settings(&$a,&$s) {
index 7e09806effab488d74a9a91aedb742e3a4b799ea..52d9c6e0f5b3e85662167f4931f8749bccc5790c 100644 (file)
@@ -10,6 +10,7 @@ use Friendica\App;
 use Friendica\BaseModule;
 use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
@@ -19,20 +20,20 @@ use Friendica\Util\Strings;
 
 function public_server_install()
 {
-       Addon::registerHook('load_config',      'addon/public_server/public_server.php', 'public_server_load_config');
-       Addon::registerHook('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
-       Addon::registerHook('cron', 'addon/public_server/public_server.php', 'public_server_cron');
-       Addon::registerHook('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
-       Addon::registerHook('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
+       Hook::register('load_config',      'addon/public_server/public_server.php', 'public_server_load_config');
+       Hook::register('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
+       Hook::register('cron', 'addon/public_server/public_server.php', 'public_server_cron');
+       Hook::register('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
+       Hook::register('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
 }
 
 function public_server_uninstall()
 {
-       Addon::unregisterHook('load_config',      'addon/public_server/public_server.php', 'public_server_load_config');
-       Addon::unregisterHook('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
-       Addon::unregisterHook('cron', 'addon/public_server/public_server.php', 'public_server_cron');
-       Addon::unregisterHook('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
-       Addon::unregisterHook('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
+       Hook::unregister('load_config',      'addon/public_server/public_server.php', 'public_server_load_config');
+       Hook::unregister('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
+       Hook::unregister('cron', 'addon/public_server/public_server.php', 'public_server_cron');
+       Hook::unregister('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
+       Hook::unregister('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
 }
 
 function public_server_load_config(App $a)
index fa0365edafdce70446c629e5f5ae9084255c24ee..8758335852ad2da55d6659248566ea2e4c8c1f1a 100644 (file)
@@ -9,8 +9,8 @@
 use Friendica\App;
 use Friendica\Content\Text\BBCode;
 use Friendica\Content\Text\HTML;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -37,30 +37,30 @@ define('PUMPIO_DEFAULT_POLL_INTERVAL', 5); // given in minutes
 
 function pumpio_install()
 {
-       Addon::registerHook('load_config',          'addon/pumpio/pumpio.php', 'pumpio_load_config');
-       Addon::registerHook('hook_fork',            'addon/pumpio/pumpio.php', 'hook_fork');
-       Addon::registerHook('post_local',           'addon/pumpio/pumpio.php', 'pumpio_post_local');
-       Addon::registerHook('notifier_normal',      'addon/pumpio/pumpio.php', 'pumpio_send');
-       Addon::registerHook('jot_networks',         'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
-       Addon::registerHook('connector_settings',      'addon/pumpio/pumpio.php', 'pumpio_settings');
-       Addon::registerHook('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
-       Addon::registerHook('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
-       Addon::registerHook('queue_predeliver', 'addon/pumpio/pumpio.php', 'pumpio_queue_hook');
-       Addon::registerHook('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
+       Hook::register('load_config',          'addon/pumpio/pumpio.php', 'pumpio_load_config');
+       Hook::register('hook_fork',            'addon/pumpio/pumpio.php', 'hook_fork');
+       Hook::register('post_local',           'addon/pumpio/pumpio.php', 'pumpio_post_local');
+       Hook::register('notifier_normal',      'addon/pumpio/pumpio.php', 'pumpio_send');
+       Hook::register('jot_networks',         'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
+       Hook::register('connector_settings',      'addon/pumpio/pumpio.php', 'pumpio_settings');
+       Hook::register('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
+       Hook::register('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
+       Hook::register('queue_predeliver', 'addon/pumpio/pumpio.php', 'pumpio_queue_hook');
+       Hook::register('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
 }
 
 function pumpio_uninstall()
 {
-       Addon::unregisterHook('load_config',      'addon/pumpio/pumpio.php', 'pumpio_load_config');
-       Addon::unregisterHook('hook_fork',        'addon/pumpio/pumpio.php', 'pumpio_hook_fork');
-       Addon::unregisterHook('post_local',       'addon/pumpio/pumpio.php', 'pumpio_post_local');
-       Addon::unregisterHook('notifier_normal',  'addon/pumpio/pumpio.php', 'pumpio_send');
-       Addon::unregisterHook('jot_networks',     'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
-       Addon::unregisterHook('connector_settings',      'addon/pumpio/pumpio.php', 'pumpio_settings');
-       Addon::unregisterHook('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
-       Addon::unregisterHook('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
-       Addon::unregisterHook('queue_predeliver', 'addon/pumpio/pumpio.php', 'pumpio_queue_hook');
-       Addon::unregisterHook('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
+       Hook::unregister('load_config',      'addon/pumpio/pumpio.php', 'pumpio_load_config');
+       Hook::unregister('hook_fork',        'addon/pumpio/pumpio.php', 'pumpio_hook_fork');
+       Hook::unregister('post_local',       'addon/pumpio/pumpio.php', 'pumpio_post_local');
+       Hook::unregister('notifier_normal',  'addon/pumpio/pumpio.php', 'pumpio_send');
+       Hook::unregister('jot_networks',     'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
+       Hook::unregister('connector_settings',      'addon/pumpio/pumpio.php', 'pumpio_settings');
+       Hook::unregister('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
+       Hook::unregister('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
+       Hook::unregister('queue_predeliver', 'addon/pumpio/pumpio.php', 'pumpio_queue_hook');
+       Hook::unregister('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
 }
 
 function pumpio_module() {}
index 16c5a44c1dae573efd30b24346020bbe67addaad..7c5e03588d8551378685fc5164a3ef4c91bbb32c 100644 (file)
  * them to open the comment window fully and insert the qcomment. Then "Submit" will submit it.
  *
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Util\XML;
 
 function qcomment_install() {
-       Addon::registerHook('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
-       Addon::registerHook('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
+       Hook::register('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
+       Hook::register('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
 
 }
 
 function qcomment_uninstall() {
-       Addon::unregisterHook('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
+       Hook::unregister('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
+       Hook::unregister('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
 
 }
 
index 7784d80b41d90e00f48d1e523bb989890d349720..ffc3237c3d007f129d907e0256df9a423fe7d079 100644 (file)
@@ -18,7 +18,7 @@
  * system will call the name_uninstall() function.
  *
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -32,7 +32,7 @@ function randplace_install() {
         *
         */
 
-       Addon::registerHook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
+       Hook::register('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
 
        /**
         *
@@ -42,8 +42,8 @@ function randplace_install() {
         *
         */
 
-       Addon::registerHook('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings');
-       Addon::registerHook('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
+       Hook::register('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings');
+       Hook::register('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
 
        Logger::log("installed randplace");
 }
@@ -59,9 +59,9 @@ function randplace_uninstall() {
         *
         */
 
-       Addon::unregisterHook('post_local',    'addon/randplace/randplace.php', 'randplace_post_hook');
-       Addon::unregisterHook('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
+       Hook::unregister('post_local',    'addon/randplace/randplace.php', 'randplace_post_hook');
+       Hook::unregister('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings');
+       Hook::unregister('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
 
 
        Logger::log("removed randplace");
index 093053e432448c0c38e89d9a50df9cd788f546e4..5adfc028559d726fce1b5442ef21ea66a3359b1b 100644 (file)
@@ -7,8 +7,8 @@
  * Status: Unsupported
  */
 
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Core\Renderer;
@@ -16,15 +16,15 @@ use Friendica\Database\DBA;
 use Friendica\Util\Strings;
 
 function remote_permissions_install() {
-       Addon::registerHook('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
-       Addon::registerHook('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
-       Addon::registerHook('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
+       Hook::register('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
+       Hook::register('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
+       Hook::register('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
 }
 
 function remote_permissions_uninstall() {
-       Addon::unregisterHook('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
-       Addon::unregisterHook('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
+       Hook::unregister('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
+       Hook::unregister('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
+       Hook::unregister('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
 }
 
 function remote_permissions_settings(&$a,&$o) {
index 3bb8892b3e16cf367ac22ad3cb29c08305900424..6a323d68fab848d2754f95be58edfb02d62a79f3 100644 (file)
@@ -6,18 +6,18 @@
  * Author: Michael Vogel <http://pirati.ca/profile/heluecht>
  *
  */
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 
 function rendertime_install() {
-       Addon::registerHook('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
+       Hook::register('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
 }
 
 
 function rendertime_uninstall() {
-       Addon::unregisterHook('init_1', 'addon/rendertime/rendertime.php', 'rendertime_init_1');
-       Addon::unregisterHook('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
+       Hook::unregister('init_1', 'addon/rendertime/rendertime.php', 'rendertime_init_1');
+       Hook::unregister('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
 }
 
 function rendertime_init_1(&$a) {
index 10a2b298a7bc35f7ce4d34158ecc395295fc21ae..a0ec211a516f06d9c1f349fc64e00e3302d38f0e 100644 (file)
@@ -7,8 +7,8 @@
  */
 
 use Friendica\App;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -28,19 +28,19 @@ require_once 'openpgp_crypt_symmetric.php';
 
 
 function securemail_install() {
-    Addon::registerHook('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
-    Addon::registerHook('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
+    Hook::register('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
+    Hook::register('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
 
-    Addon::registerHook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
+    Hook::register('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
 
     Logger::log('installed securemail');
 }
 
 function securemail_uninstall() {
-    Addon::unregisterHook('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
-    Addon::unregisterHook('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
+    Hook::unregister('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
+    Hook::unregister('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
 
-    Addon::unregisterHook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
+    Hook::unregister('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
 
     Logger::log('removed securemail');
 }
index a7b5979b8a219c0b634444ab2843eff22779a5f7..f7bb0c505e9ae2e05ad5ba3d9fec19373bf87ec3 100644 (file)
@@ -7,23 +7,23 @@
  *         based upon NSFW from Mike Macgirvin <http://macgirvin.com/profile/mike>
  *
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Util\Strings;
 
 function showmore_install()
 {
-       Addon::registerHook('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
-       Addon::registerHook('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
-       Addon::registerHook('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
+       Hook::register('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
+       Hook::register('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
+       Hook::register('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
 }
 
 function showmore_uninstall()
 {
-       Addon::unregisterHook('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
-       Addon::unregisterHook('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
+       Hook::unregister('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
+       Hook::unregister('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
+       Hook::unregister('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
 }
 
 function showmore_addon_settings(&$a, &$s)
index c832fbbaf8afc01829365838bb8309cf8fe6b45c..febdd41c395e283c18956af42b45a7941c3d5ddd 100644 (file)
@@ -6,14 +6,14 @@
  * Author: Thomas Willingham (based on Mike Macgirvin's Adult Smile template) 
  * All smileys from sites offering them as Public Domain
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 
 function smiley_pack_es_install() {
-       Addon::registerHook('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies_es');
+       Hook::register('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies_es');
 }
 
 function smiley_pack_es_uninstall() {
-       Addon::unregisterHook('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies');
+       Hook::unregister('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies');
 }
 
  
index 08ddb034340c03df91df71b9b6146eb802a01afc..5f10a5b101dd2b25051b360bb4e5492fca8cf55e 100644 (file)
@@ -8,14 +8,14 @@
  * 
  * 
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 
 function smiley_pack_fr_install() {
-       Addon::registerHook('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
+       Hook::register('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
 }
 
 function smiley_pack_fr_uninstall() {
-       Addon::unregisterHook('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
+       Hook::unregister('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
 }
 
  
index a373c6253334f63d8a91d79ad46c16681be18929..607f35570a7e1f9afb8a18caec737c0533df544b 100644 (file)
@@ -7,14 +7,14 @@
  * All smileys from sites offering them as Public Domain
  */
 
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 
 function smiley_pack_install() {
-       Addon::registerHook('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
+       Hook::register('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
 }
 
 function smiley_pack_uninstall() {
-       Addon::unregisterHook('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
+       Hook::unregister('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
 }
 
  
index fd779bace38a32a667a2264c0d70c0bf2156a2d9..593eed8b0912c6b6484379d53dbafc34feb43e99 100644 (file)
@@ -5,13 +5,12 @@
  * Version: 0.2
  * Author: Johannes Schwab <https://friendica.jschwab.org/profile/ddorian>
  */
-use Friendica\Core\Addon;
 use Friendica\Core\Hook;
 use Friendica\Core\Logger;
 
 function smileybutton_install() {
        //Register hooks
-       Addon::registerHook('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button');
+       Hook::register('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button');
 
        Logger::log("installed smileybutton");
 }
@@ -19,7 +18,7 @@ function smileybutton_install() {
 
 function smileybutton_uninstall() {
        //Delet registered hooks
-       Addon::unregisterHook('jot_tool',    'addon/smileybutton/smileybutton.php', 'show_button');
+       Hook::unregister('jot_tool',    'addon/smileybutton/smileybutton.php', 'show_button');
 
        Logger::log("removed smileybutton");
 }
index b12cf615849b2e18a37a63bb86b86469fa9b5b02..c0095923ecc2320c0beef133eaf7bea7b36b88d3 100644 (file)
@@ -8,14 +8,14 @@
  * This is a template for how to extend the "smily" code.
  * 
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 
 function smilies_adult_install() {
-       Addon::registerHook('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
+       Hook::register('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
 }
 
 function smilies_adult_uninstall() {
-       Addon::unregisterHook('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
+       Hook::unregister('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
 }
 
  
index 751aa53b2c05e943c4ca7fbe102bef20a0260ad6..72300838b787c3813fea129a8b048908fc16e20c 100644 (file)
@@ -9,14 +9,14 @@
  * Version: 1.0
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 
 function sniper_install() {
-    Addon::registerHook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
+    Hook::register('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
 }
 
 function sniper_uninstall() {
-    Addon::unregisterHook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
+    Hook::unregister('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
 
 }
 
index b955161ba5f0824f7bf2fbdad3ca2d230b865055..82ae1eb04db6f7dd0ea1722b415d82b9dc5c4157 100644 (file)
@@ -6,21 +6,21 @@
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  *
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 
 function startpage_install() {
-       Addon::registerHook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
-       Addon::registerHook('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings');
-       Addon::registerHook('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
+       Hook::register('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
+       Hook::register('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings');
+       Hook::register('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
 }
 
 function startpage_uninstall()
 {
-       Addon::unregisterHook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
-       Addon::unregisterHook('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
+       Hook::unregister('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
+       Hook::unregister('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings');
+       Hook::unregister('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
 }
 
 function startpage_home_init($a, $b)
index 28920dd670320042c8337bc2ec8605457ac2714e..9b50111a636bd07c3c92e0f76151b25e79edad3c 100644 (file)
@@ -43,8 +43,8 @@ use Friendica\App;
 use Friendica\Content\OEmbed;
 use Friendica\Content\Text\HTML;
 use Friendica\Content\Text\Plaintext;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -65,34 +65,34 @@ use Friendica\Util\Strings;
 function statusnet_install()
 {
        //  we need some hooks, for the configuration and for sending tweets
-       Addon::registerHook('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
-       Addon::registerHook('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
-       Addon::registerHook('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
-       Addon::registerHook('hook_fork', 'addon/statusnet/statusnet.php', 'statusnet_hook_fork');
-       Addon::registerHook('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
-       Addon::registerHook('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
-       Addon::registerHook('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
-       Addon::registerHook('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
-       Addon::registerHook('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
+       Hook::register('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
+       Hook::register('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
+       Hook::register('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
+       Hook::register('hook_fork', 'addon/statusnet/statusnet.php', 'statusnet_hook_fork');
+       Hook::register('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
+       Hook::register('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
+       Hook::register('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
+       Hook::register('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
+       Hook::register('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
        Logger::log("installed GNU Social");
 }
 
 function statusnet_uninstall()
 {
-       Addon::unregisterHook('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
-       Addon::unregisterHook('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
-       Addon::unregisterHook('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
-       Addon::unregisterHook('hook_fork', 'addon/statusnet/statusnet.php', 'statusnet_hook_fork');
-       Addon::unregisterHook('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
-       Addon::unregisterHook('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
-       Addon::unregisterHook('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
-       Addon::unregisterHook('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
-       Addon::unregisterHook('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
+       Hook::unregister('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
+       Hook::unregister('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
+       Hook::unregister('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
+       Hook::unregister('hook_fork', 'addon/statusnet/statusnet.php', 'statusnet_hook_fork');
+       Hook::unregister('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
+       Hook::unregister('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
+       Hook::unregister('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
+       Hook::unregister('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
+       Hook::unregister('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
 
        // old setting - remove only
-       Addon::unregisterHook('post_local_end', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
-       Addon::unregisterHook('addon_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
+       Hook::unregister('post_local_end', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
+       Hook::unregister('addon_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
+       Hook::unregister('addon_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
 }
 
 function statusnet_check_item_notification(App $a, &$notification_data)
index 9d40509ee10fcac7a1594b01ec2e58fea381a391..da4260d0a3926a5d5580ab2e85aee706f197ec3b 100644 (file)
@@ -6,27 +6,27 @@
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  *
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Util\Strings;
 
 function superblock_install()
 {
-       Addon::registerHook('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
-       Addon::registerHook('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
-       Addon::registerHook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
-       Addon::registerHook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
-       Addon::registerHook('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
+       Hook::register('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
+       Hook::register('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
+       Hook::register('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
+       Hook::register('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
+       Hook::register('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
 }
 
 function superblock_uninstall()
 {
-       Addon::unregisterHook('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
-       Addon::unregisterHook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
-       Addon::unregisterHook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
-       Addon::unregisterHook('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
+       Hook::unregister('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
+       Hook::unregister('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
+       Hook::unregister('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
+       Hook::unregister('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
+       Hook::unregister('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
 }
 
 function superblock_addon_settings(&$a, &$s)
index 6daf136e19fd09a08970772b613a64b96da833e8..f15acc266e6c3618fe7a04e17a699918315578e6 100644 (file)
@@ -7,8 +7,8 @@
  */
 
 use Friendica\App;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Database\DBA;
 use Friendica\Model\User;
@@ -16,22 +16,22 @@ use Friendica\Util\DateTimeFormat;
 
 function testdrive_install() {
 
-       Addon::registerHook('load_config',      'addon/testdrive/testdrive.php', 'testdrive_load_config');
-       Addon::registerHook('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
-       Addon::registerHook('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
-       Addon::registerHook('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
-       Addon::registerHook('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
+       Hook::register('load_config',      'addon/testdrive/testdrive.php', 'testdrive_load_config');
+       Hook::register('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
+       Hook::register('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
+       Hook::register('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
+       Hook::register('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
 
 }
 
 
 function testdrive_uninstall() {
 
-       Addon::unregisterHook('load_config',      'addon/testdrive/testdrive.php', 'testdrive_load_config');
-       Addon::unregisterHook('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
-       Addon::unregisterHook('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
-       Addon::unregisterHook('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
-       Addon::unregisterHook('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
+       Hook::unregister('load_config',      'addon/testdrive/testdrive.php', 'testdrive_load_config');
+       Hook::unregister('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
+       Hook::unregister('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
+       Hook::unregister('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
+       Hook::unregister('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
 
 }
 
index fe2c5cf12d5034306159506de74fac76d0f843dc..ad0a6077fa640bcf0a061c1869685bbfb364564f 100644 (file)
@@ -6,14 +6,15 @@
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  */
 use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 
 function tictac_install() {
-       Addon::registerHook('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
+       Hook::register('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
 }
 
 function tictac_uninstall() {
-       Addon::unregisterHook('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
+       Hook::unregister('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
 
 }
 
index 2d4bd1a3be0b7fd1a4bbbb3519cfb6b734346afb..62f711325ca99567d92f80cfca3a4f45c32111ea 100644 (file)
@@ -11,8 +11,8 @@ require_once __DIR__ . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . '
 
 use Friendica\App;
 use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -22,22 +22,22 @@ use Friendica\Util\Strings;
 
 function tumblr_install()
 {
-       Addon::registerHook('hook_fork',               'addon/tumblr/tumblr.php', 'tumblr_hook_fork');
-       Addon::registerHook('post_local',              'addon/tumblr/tumblr.php', 'tumblr_post_local');
-       Addon::registerHook('notifier_normal',         'addon/tumblr/tumblr.php', 'tumblr_send');
-       Addon::registerHook('jot_networks',            'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
-       Addon::registerHook('connector_settings',      'addon/tumblr/tumblr.php', 'tumblr_settings');
-       Addon::registerHook('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
+       Hook::register('hook_fork',               'addon/tumblr/tumblr.php', 'tumblr_hook_fork');
+       Hook::register('post_local',              'addon/tumblr/tumblr.php', 'tumblr_post_local');
+       Hook::register('notifier_normal',         'addon/tumblr/tumblr.php', 'tumblr_send');
+       Hook::register('jot_networks',            'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
+       Hook::register('connector_settings',      'addon/tumblr/tumblr.php', 'tumblr_settings');
+       Hook::register('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
 }
 
 function tumblr_uninstall()
 {
-       Addon::unregisterHook('hook_fork',               'addon/tumblr/tumblr.php', 'tumblr_hook_fork');
-       Addon::unregisterHook('post_local',              'addon/tumblr/tumblr.php', 'tumblr_post_local');
-       Addon::unregisterHook('notifier_normal',         'addon/tumblr/tumblr.php', 'tumblr_send');
-       Addon::unregisterHook('jot_networks',            'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
-       Addon::unregisterHook('connector_settings',      'addon/tumblr/tumblr.php', 'tumblr_settings');
-       Addon::unregisterHook('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
+       Hook::unregister('hook_fork',               'addon/tumblr/tumblr.php', 'tumblr_hook_fork');
+       Hook::unregister('post_local',              'addon/tumblr/tumblr.php', 'tumblr_post_local');
+       Hook::unregister('notifier_normal',         'addon/tumblr/tumblr.php', 'tumblr_send');
+       Hook::unregister('jot_networks',            'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
+       Hook::unregister('connector_settings',      'addon/tumblr/tumblr.php', 'tumblr_settings');
+       Hook::unregister('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
 }
 
 function tumblr_module()
index 43269a878d4d3e6c48c5bfef95c5cbe90395572d..64b8f409115170699538e43bc99dafad8fff571b 100644 (file)
@@ -68,8 +68,8 @@ use Friendica\App;
 use Friendica\Content\OEmbed;
 use Friendica\Content\Text\BBCode;
 use Friendica\Content\Text\Plaintext;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -102,42 +102,42 @@ define('TWITTER_DEFAULT_POLL_INTERVAL', 5); // given in minutes
 function twitter_install()
 {
        //  we need some hooks, for the configuration and for sending tweets
-       Addon::registerHook('load_config'            , __FILE__, 'twitter_load_config');
-       Addon::registerHook('connector_settings'     , __FILE__, 'twitter_settings');
-       Addon::registerHook('connector_settings_post', __FILE__, 'twitter_settings_post');
-       Addon::registerHook('hook_fork'              , __FILE__, 'twitter_hook_fork');
-       Addon::registerHook('post_local'             , __FILE__, 'twitter_post_local');
-       Addon::registerHook('notifier_normal'        , __FILE__, 'twitter_post_hook');
-       Addon::registerHook('jot_networks'           , __FILE__, 'twitter_jot_nets');
-       Addon::registerHook('cron'                   , __FILE__, 'twitter_cron');
-       Addon::registerHook('queue_predeliver'       , __FILE__, 'twitter_queue_hook');
-       Addon::registerHook('follow'                 , __FILE__, 'twitter_follow');
-       Addon::registerHook('expire'                 , __FILE__, 'twitter_expire');
-       Addon::registerHook('prepare_body'           , __FILE__, 'twitter_prepare_body');
-       Addon::registerHook('check_item_notification', __FILE__, 'twitter_check_item_notification');
+       Hook::register('load_config'            , __FILE__, 'twitter_load_config');
+       Hook::register('connector_settings'     , __FILE__, 'twitter_settings');
+       Hook::register('connector_settings_post', __FILE__, 'twitter_settings_post');
+       Hook::register('hook_fork'              , __FILE__, 'twitter_hook_fork');
+       Hook::register('post_local'             , __FILE__, 'twitter_post_local');
+       Hook::register('notifier_normal'        , __FILE__, 'twitter_post_hook');
+       Hook::register('jot_networks'           , __FILE__, 'twitter_jot_nets');
+       Hook::register('cron'                   , __FILE__, 'twitter_cron');
+       Hook::register('queue_predeliver'       , __FILE__, 'twitter_queue_hook');
+       Hook::register('follow'                 , __FILE__, 'twitter_follow');
+       Hook::register('expire'                 , __FILE__, 'twitter_expire');
+       Hook::register('prepare_body'           , __FILE__, 'twitter_prepare_body');
+       Hook::register('check_item_notification', __FILE__, 'twitter_check_item_notification');
        Logger::log("installed twitter");
 }
 
 function twitter_uninstall()
 {
-       Addon::unregisterHook('load_config'            , __FILE__, 'twitter_load_config');
-       Addon::unregisterHook('connector_settings'     , __FILE__, 'twitter_settings');
-       Addon::unregisterHook('connector_settings_post', __FILE__, 'twitter_settings_post');
-       Addon::unregisterHook('hook_fork'              , __FILE__, 'twitter_hook_fork');
-       Addon::unregisterHook('post_local'             , __FILE__, 'twitter_post_local');
-       Addon::unregisterHook('notifier_normal'        , __FILE__, 'twitter_post_hook');
-       Addon::unregisterHook('jot_networks'           , __FILE__, 'twitter_jot_nets');
-       Addon::unregisterHook('cron'                   , __FILE__, 'twitter_cron');
-       Addon::unregisterHook('queue_predeliver'       , __FILE__, 'twitter_queue_hook');
-       Addon::unregisterHook('follow'                 , __FILE__, 'twitter_follow');
-       Addon::unregisterHook('expire'                 , __FILE__, 'twitter_expire');
-       Addon::unregisterHook('prepare_body'           , __FILE__, 'twitter_prepare_body');
-       Addon::unregisterHook('check_item_notification', __FILE__, 'twitter_check_item_notification');
+       Hook::unregister('load_config'            , __FILE__, 'twitter_load_config');
+       Hook::unregister('connector_settings'     , __FILE__, 'twitter_settings');
+       Hook::unregister('connector_settings_post', __FILE__, 'twitter_settings_post');
+       Hook::unregister('hook_fork'              , __FILE__, 'twitter_hook_fork');
+       Hook::unregister('post_local'             , __FILE__, 'twitter_post_local');
+       Hook::unregister('notifier_normal'        , __FILE__, 'twitter_post_hook');
+       Hook::unregister('jot_networks'           , __FILE__, 'twitter_jot_nets');
+       Hook::unregister('cron'                   , __FILE__, 'twitter_cron');
+       Hook::unregister('queue_predeliver'       , __FILE__, 'twitter_queue_hook');
+       Hook::unregister('follow'                 , __FILE__, 'twitter_follow');
+       Hook::unregister('expire'                 , __FILE__, 'twitter_expire');
+       Hook::unregister('prepare_body'           , __FILE__, 'twitter_prepare_body');
+       Hook::unregister('check_item_notification', __FILE__, 'twitter_check_item_notification');
 
        // old setting - remove only
-       Addon::unregisterHook('post_local_end'     , __FILE__, 'twitter_post_hook');
-       Addon::unregisterHook('addon_settings'     , __FILE__, 'twitter_settings');
-       Addon::unregisterHook('addon_settings_post', __FILE__, 'twitter_settings_post');
+       Hook::unregister('post_local_end'     , __FILE__, 'twitter_post_hook');
+       Hook::unregister('addon_settings'     , __FILE__, 'twitter_settings');
+       Hook::unregister('addon_settings_post', __FILE__, 'twitter_settings_post');
 }
 
 function twitter_load_config(App $a)
index faa553cc18cd2d31587cf280c48fac65523ead39..f212dc75224adc60275866a8b3a2894762862da3 100644 (file)
@@ -5,15 +5,15 @@
  * Version: 1.0
  * Author: Michael Vogel <http://pirati.ca/profile/heluecht>
  */
-use Friendica\Core\Addon;
 use Friendica\Content\Smilies;
+use Friendica\Core\Hook;
 
 function unicode_smilies_install() {
-       Addon::registerHook('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
+       Hook::register('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
 }
 
 function unicode_smilies_uninstall() {
-       Addon::unregisterHook('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
+       Hook::unregister('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
 }
 
 function unicode_smilies_smilies(&$a,&$b) {
index 5d00888ba378c876ec8b26436b8c23d9ec6446e3..a890be2a303383cc972c8c371158b14ddce9097f 100644 (file)
@@ -6,20 +6,20 @@
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  *
  */
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Model\Item;
 use Friendica\Database\DBA;
 
 function viewsrc_install() {
-       Addon::registerHook('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
-       Addon::registerHook('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
+       Hook::register('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
+       Hook::register('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
 }
 
 
 function viewsrc_uninstall() {
-       Addon::unregisterHook('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
-       Addon::unregisterHook('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
+       Hook::unregister('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
+       Hook::unregister('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
 
 }
 
index 61bacfcd46bf2681e98591d53a46df1ea2637046..026e3cc301e4474c20349ff7df57a4c4b59cb426 100644 (file)
@@ -6,18 +6,18 @@
  * Author: Stephen Mahood <https://friends.mayfirst.org/profile/marxistvegan>
  * Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
  */
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Renderer;
 use Friendica\Util\Strings;
 
 function webrtc_install() {
-        Addon::registerHook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
+        Hook::register('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
 }
 
 function webrtc_uninstall() {
-        Addon::unregisterHook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
+        Hook::unregister('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
 
 }
 
index 48d3265367ea1ea90258610cb467c94e71173369..4cb28cd7c554a0cb78a08e2c3527551bbf1f03e1 100644 (file)
@@ -7,7 +7,7 @@
  * Status: Unsupported
  */
 
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -15,14 +15,14 @@ use Friendica\Core\Renderer;
 use Friendica\Database\DBA;
 
 function widgets_install() {
-       Addon::registerHook('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
-       Addon::registerHook('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
+       Hook::register('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
+       Hook::register('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
        Logger::log("installed widgets");
 }
 
 function widgets_uninstall() {
-       Addon::unregisterHook('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
+       Hook::unregister('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
+       Hook::unregister('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
 }
 
 function widgets_settings_post(){
index 295011918074ebd8ee0eae62e14f0c561bbe9de3..65fcc35754fd38b4d620d19cab000a864a7c7d1d 100644 (file)
@@ -29,7 +29,6 @@
 use Friendica\App;
 use Friendica\Content\Text\BBCode;
 use Friendica\Content\Text\HTML;
-use Friendica\Core\Addon;
 use Friendica\Core\Authentication;
 use Friendica\Core\Hook;
 use Friendica\Core\L10n;
@@ -45,15 +44,15 @@ function windowsphonepush_install()
         * The first is within cron - so the push notifications will be
         * sent every 10 minutes (or whatever is set in crontab).
         */
-       Addon::registerHook('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
+       Hook::register('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
 
        /* Then we'll attach into the addon settings page, and also the
         * settings post hook so that we can create and update
         * user preferences. User shall be able to activate the addon and
         * define whether he allows pushing first characters of item text
         */
-       Addon::registerHook('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
-       Addon::registerHook('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
+       Hook::register('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
+       Hook::register('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
 
        Logger::log("installed windowsphonepush");
 }
@@ -63,9 +62,9 @@ function windowsphonepush_uninstall()
        /* uninstall unregisters any hooks created with register_hook
         * during install. Don't delete data in table `pconfig`.
         */
-       Addon::unregisterHook('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
-       Addon::unregisterHook('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
+       Hook::unregister('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
+       Hook::unregister('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
+       Hook::unregister('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
 
        Logger::log("removed windowsphonepush");
 }
index 1cc27976aeec35f6e12125476839075528045582..0e95fcdd2d5689996e5158f8f3ff5b1631458705 100644 (file)
@@ -6,10 +6,9 @@
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  */
 
-use Friendica\App;
 use Friendica\Content\Text\BBCode;
 use Friendica\Content\Text\HTML;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
@@ -20,27 +19,27 @@ use Friendica\Util\XML;
 
 function wppost_install()
 {
-       Addon::registerHook('hook_fork',            'addon/wppost/wppost.php', 'wppost_hook_fork');
-       Addon::registerHook('post_local',           'addon/wppost/wppost.php', 'wppost_post_local');
-       Addon::registerHook('notifier_normal',      'addon/wppost/wppost.php', 'wppost_send');
-       Addon::registerHook('jot_networks',         'addon/wppost/wppost.php', 'wppost_jot_nets');
-       Addon::registerHook('connector_settings',      'addon/wppost/wppost.php', 'wppost_settings');
-       Addon::registerHook('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
+       Hook::register('hook_fork',            'addon/wppost/wppost.php', 'wppost_hook_fork');
+       Hook::register('post_local',           'addon/wppost/wppost.php', 'wppost_post_local');
+       Hook::register('notifier_normal',      'addon/wppost/wppost.php', 'wppost_send');
+       Hook::register('jot_networks',         'addon/wppost/wppost.php', 'wppost_jot_nets');
+       Hook::register('connector_settings',      'addon/wppost/wppost.php', 'wppost_settings');
+       Hook::register('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
 }
 
 function wppost_uninstall()
 {
-       Addon::unregisterHook('hook_fork',        'addon/wppost/wppost.php', 'wppost_hook_fork');
-       Addon::unregisterHook('post_local',       'addon/wppost/wppost.php', 'wppost_post_local');
-       Addon::unregisterHook('notifier_normal',  'addon/wppost/wppost.php', 'wppost_send');
-       Addon::unregisterHook('jot_networks',     'addon/wppost/wppost.php', 'wppost_jot_nets');
-       Addon::unregisterHook('connector_settings',      'addon/wppost/wppost.php', 'wppost_settings');
-       Addon::unregisterHook('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
+       Hook::unregister('hook_fork',        'addon/wppost/wppost.php', 'wppost_hook_fork');
+       Hook::unregister('post_local',       'addon/wppost/wppost.php', 'wppost_post_local');
+       Hook::unregister('notifier_normal',  'addon/wppost/wppost.php', 'wppost_send');
+       Hook::unregister('jot_networks',     'addon/wppost/wppost.php', 'wppost_jot_nets');
+       Hook::unregister('connector_settings',      'addon/wppost/wppost.php', 'wppost_settings');
+       Hook::unregister('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
 
        // obsolete - remove
-       Addon::unregisterHook('post_local_end',   'addon/wppost/wppost.php', 'wppost_send');
-       Addon::unregisterHook('addon_settings',  'addon/wppost/wppost.php', 'wppost_settings');
-       Addon::unregisterHook('addon_settings_post',  'addon/wppost/wppost.php', 'wppost_settings_post');
+       Hook::unregister('post_local_end',   'addon/wppost/wppost.php', 'wppost_send');
+       Hook::unregister('addon_settings',  'addon/wppost/wppost.php', 'wppost_settings');
+       Hook::unregister('addon_settings_post',  'addon/wppost/wppost.php', 'wppost_settings_post');
 }
 
 
index 51ad2c90dcad776cfe78a27350613aa1ea1b6cca..6b88ac04cb5e4729492fc511c123b87981f827a5 100644 (file)
@@ -7,8 +7,8 @@
  */
 
 use Friendica\App;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Core\Renderer;
@@ -16,18 +16,18 @@ use Friendica\Util\Strings;
 
 function xmpp_install()
 {
-       Addon::registerHook('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings');
-       Addon::registerHook('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post');
-       Addon::registerHook('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
-       Addon::registerHook('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
+       Hook::register('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings');
+       Hook::register('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post');
+       Hook::register('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
+       Hook::register('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
 }
 
 function xmpp_uninstall()
 {
-       Addon::unregisterHook('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings');
-       Addon::unregisterHook('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post');
-       Addon::unregisterHook('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
-       Addon::unregisterHook('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
+       Hook::unregister('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings');
+       Hook::unregister('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post');
+       Hook::unregister('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
+       Hook::unregister('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
 }
 
 function xmpp_addon_settings_post()