diff --git a/blackout/blackout.php b/blackout/blackout.php
index 2693db5a..94e081ce 100644
--- a/blackout/blackout.php
+++ b/blackout/blackout.php
@@ -50,13 +50,14 @@
*/
use Friendica\Core\Config;
+use Friendica\Core\Addon;
function blackout_install() {
- register_hook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
+ Addon::registerHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
}
function blackout_uninstall() {
- unregister_hook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
+ Addon::unregisterHook('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
diff --git a/blockem/blockem.php b/blockem/blockem.php
index 2c91373f..2a2cd3d2 100644
--- a/blockem/blockem.php
+++ b/blockem/blockem.php
@@ -1,6 +1,4 @@
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function blockem_install() {
- register_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
- register_hook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
- register_hook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
- register_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
- register_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
- register_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
- register_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' );
+ Addon::registerHook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
+ Addon::registerHook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
+ Addon::registerHook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
+ Addon::registerHook('plugin_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' );
}
function blockem_uninstall() {
- unregister_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
- unregister_hook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
- unregister_hook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
- unregister_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
- unregister_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
- unregister_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
- unregister_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' );
+ Addon::unregisterHook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
+ Addon::unregisterHook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
+ Addon::unregisterHook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
+ Addon::unregisterHook('plugin_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' );
}
diff --git a/blogger/blogger.php b/blogger/blogger.php
index 093d9049..7c9e1c5d 100644
--- a/blogger/blogger.php
+++ b/blogger/blogger.php
@@ -1,33 +1,32 @@
*/
+use Friendica\Core\Addon;
+
+function buglink_install() { Addon::registerHook('page_end', 'addon/buglink/buglink.php', 'buglink_active'); }
-function buglink_install() { register_hook('page_end', 'addon/buglink/buglink.php', 'buglink_active'); }
-
-
-function buglink_uninstall() { unregister_hook('page_end', 'addon/buglink/buglink.php', 'buglink_active'); }
+function buglink_uninstall() { Addon::unregisterHook('page_end', 'addon/buglink/buglink.php', 'buglink_active'); }
function buglink_active(&$a,&$b) { $b .= '
'; }
diff --git a/calc/calc.php b/calc/calc.php
index a299d45e..176ade85 100644
--- a/calc/calc.php
+++ b/calc/calc.php
@@ -5,14 +5,14 @@
* Version: 1.0
* Author: Mike Macgirvin
*/
-
+use Friendica\Core\Addon;
function calc_install() {
- register_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
+ Addon::registerHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}
function calc_uninstall() {
- unregister_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
+ Addon::unregisterHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}
diff --git a/communityhome/communityhome.php b/communityhome/communityhome.php
index 8364392b..f3e4783e 100644
--- a/communityhome/communityhome.php
+++ b/communityhome/communityhome.php
@@ -5,7 +5,7 @@
* Version: 2.0
* Author: Fabio Comuni
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Module\Login;
@@ -13,12 +13,12 @@ require_once('mod/community.php');
function communityhome_install() {
- register_hook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
+ Addon::registerHook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
logger("installed communityhome");
}
function communityhome_uninstall() {
- unregister_hook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
+ Addon::unregisterHook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home');
logger("removed communityhome");
}
diff --git a/convert/convert.php b/convert/convert.php
index 03b1e9d5..1ddd2978 100644
--- a/convert/convert.php
+++ b/convert/convert.php
@@ -5,13 +5,14 @@
* Version: 1.0
* Author: Mike Macgirvin
*/
+use Friendica\Core\Addon;
function convert_install() {
- register_hook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
+ Addon::registerHook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
}
function convert_uninstall() {
- unregister_hook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
+ Addon::unregisterHook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
}
function convert_app_menu($a,&$b) {
diff --git a/curweather/curweather.php b/curweather/curweather.php
index 7b8b89e3..bcbba91d 100644
--- a/curweather/curweather.php
+++ b/curweather/curweather.php
@@ -13,6 +13,7 @@ require_once('include/network.php');
require_once("mod/proxy.php");
require_once('include/text.php');
+use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
@@ -66,15 +67,15 @@ function getWeather( $loc, $units='metric', $lang='en', $appid='', $cachetime=0)
}
function curweather_install() {
- register_hook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init');
- register_hook('plugin_settings', 'addon/curweather/curweather.php', 'curweather_plugin_settings');
- register_hook('plugin_settings_post', 'addon/curweather/curweather.php', 'curweather_plugin_settings_post');
+ Addon::registerHook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init');
+ Addon::registerHook('plugin_settings', 'addon/curweather/curweather.php', 'curweather_plugin_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/curweather/curweather.php', 'curweather_plugin_settings_post');
}
function curweather_uninstall() {
- unregister_hook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init');
- unregister_hook('plugin_settings', 'addon/curweather/curweather.php', 'curweather_plugin_settings');
- unregister_hook('plugin_settings_post', 'addon/curweather/curweather.php', 'curweather_plugin_settings_post');
+ Addon::unregisterHook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init');
+ Addon::unregisterHook('plugin_settings', 'addon/curweather/curweather.php', 'curweather_plugin_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/curweather/curweather.php', 'curweather_plugin_settings_post');
}
function curweather_network_mod_init(&$fk_app,&$b) {
diff --git a/dav/friendica/main.php b/dav/friendica/main.php
index e1dfe84f..afeadcf0 100644
--- a/dav/friendica/main.php
+++ b/dav/friendica/main.php
@@ -1,5 +1,6 @@
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function dwpost_install() {
- register_hook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
- register_hook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
- register_hook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
- register_hook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
- register_hook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
+ 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');
}
function dwpost_uninstall() {
- unregister_hook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
- unregister_hook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
- unregister_hook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
- unregister_hook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
- unregister_hook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
+ 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');
}
diff --git a/fortunate/fortunate.php b/fortunate/fortunate.php
index 427d620c..8e28879c 100644
--- a/fortunate/fortunate.php
+++ b/fortunate/fortunate.php
@@ -5,20 +5,21 @@
* Version: 1.0
* Author: Mike Macgirvin
*/
+use Friendica\Core\Addon;
// IMPORTANT: SET THIS to your fortunate server
define ('FORTUNATE_SERVER', 'hostname.com');
function fortunate_install() {
- register_hook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
+ Addon::registerHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
if(FORTUNATE_SERVER == 'hostname.com' && is_site_admin()) {
notice('Fortunate plugin requires configuration. See README');
}
}
function fortunate_uninstall() {
- unregister_hook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
+ Addon::unregisterHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
}
diff --git a/forumdirectory/forumdirectory.php b/forumdirectory/forumdirectory.php
index 393063cb..186697f2 100644
--- a/forumdirectory/forumdirectory.php
+++ b/forumdirectory/forumdirectory.php
@@ -9,17 +9,16 @@
use Friendica\Content\Nav;
use Friendica\Content\Widget;
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Database\DBM;
-function forumdirectory_install()
-{
- register_hook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
+function forumdirectory_install() {
+Addon::registerHook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
}
-function forumdirectory_uninstall()
-{
- unregister_hook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
+function forumdirectory_uninstall() {
+Addon::unregisterHook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
}
function forumdirectory_module()
diff --git a/fromapp/fromapp.php b/fromapp/fromapp.php
index 51392ff5..4872e2a0 100644
--- a/fromapp/fromapp.php
+++ b/fromapp/fromapp.php
@@ -6,14 +6,14 @@
* Author: Commander Zot
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function fromapp_install() {
- register_hook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
- register_hook('plugin_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
- register_hook('plugin_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
+ Addon::registerHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
+ Addon::registerHook('plugin_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
logger("installed fromapp");
}
@@ -21,9 +21,9 @@ function fromapp_install() {
function fromapp_uninstall() {
- unregister_hook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
- unregister_hook('plugin_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
- unregister_hook('plugin_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
+ Addon::unregisterHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
+ Addon::unregisterHook('plugin_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
logger("removed fromapp");
diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php
index 464829a4..b8910d5d 100644
--- a/fromgplus/fromgplus.php
+++ b/fromgplus/fromgplus.php
@@ -9,6 +9,7 @@
define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Object\Image;
@@ -18,19 +19,19 @@ require_once 'mod/parse_url.php';
require_once 'include/text.php';
function fromgplus_install() {
- register_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
- register_hook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
- register_hook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
+ 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');
}
function fromgplus_uninstall() {
- unregister_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
- unregister_hook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
- unregister_hook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
+ 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');
// Old hooks
- unregister_hook('plugin_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
- unregister_hook('plugin_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
+ Addon::unregisterHook('plugin_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
}
function fromgplus_addon_settings(&$a,&$s) {
diff --git a/geocoordinates/geocoordinates.php b/geocoordinates/geocoordinates.php
index 0171f7c2..714b8d81 100644
--- a/geocoordinates/geocoordinates.php
+++ b/geocoordinates/geocoordinates.php
@@ -5,21 +5,21 @@
* Version: 0.1
* Author: Michael Vogel
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
function geocoordinates_install()
{
- register_hook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
- register_hook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
+ Addon::registerHook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
+ Addon::registerHook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
}
function geocoordinates_uninstall()
{
- unregister_hook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
- unregister_hook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
+ Addon::unregisterHook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
+ Addon::unregisterHook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
}
function geocoordinates_resolve_item(&$item)
diff --git a/geonames/geonames.php b/geonames/geonames.php
index 71e05c8b..55ae1920 100644
--- a/geonames/geonames.php
+++ b/geonames/geonames.php
@@ -19,7 +19,7 @@
* system will call the name_uninstall() function.
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
@@ -32,7 +32,7 @@ function geonames_install() {
*
*/
- register_hook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
+ Addon::registerHook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
/**
*
@@ -42,8 +42,8 @@ function geonames_install() {
*
*/
- register_hook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_plugin_admin');
- register_hook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_plugin_admin_post');
+ Addon::registerHook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_plugin_admin');
+ Addon::registerHook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_plugin_admin_post');
logger("installed geonames");
}
@@ -59,9 +59,9 @@ function geonames_uninstall() {
*
*/
- unregister_hook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
- unregister_hook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_plugin_admin');
- unregister_hook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_plugin_admin_post');
+ Addon::unregisterHook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
+ Addon::unregisterHook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_plugin_admin');
+ Addon::unregisterHook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_plugin_admin_post');
logger("removed geonames");
diff --git a/gnot/gnot.php b/gnot/gnot.php
index bbdf9d80..70f422b6 100644
--- a/gnot/gnot.php
+++ b/gnot/gnot.php
@@ -7,14 +7,14 @@
*
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function gnot_install() {
- register_hook('plugin_settings', 'addon/gnot/gnot.php', 'gnot_settings');
- register_hook('plugin_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
- register_hook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
+ Addon::registerHook('plugin_settings', 'addon/gnot/gnot.php', 'gnot_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
+ Addon::registerHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
logger("installed gnot");
}
@@ -22,9 +22,9 @@ function gnot_install() {
function gnot_uninstall() {
- unregister_hook('plugin_settings', 'addon/gnot/gnot.php', 'gnot_settings');
- unregister_hook('plugin_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
- unregister_hook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
+ Addon::unregisterHook('plugin_settings', 'addon/gnot/gnot.php', 'gnot_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
+ Addon::unregisterHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
logger("removed gnot");
diff --git a/googlemaps/googlemaps.php b/googlemaps/googlemaps.php
index f5b573ac..e294c8e0 100644
--- a/googlemaps/googlemaps.php
+++ b/googlemaps/googlemaps.php
@@ -6,19 +6,19 @@
* Author: Michael Vogel
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Cache;
function googlemaps_install()
{
- register_hook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
+ Addon::registerHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
logger("installed googlemaps");
}
function googlemaps_uninstall()
{
- unregister_hook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
+ Addon::unregisterHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
logger("removed googlemaps");
}
diff --git a/gravatar/gravatar.php b/gravatar/gravatar.php
index e38fb613..731129c0 100644
--- a/gravatar/gravatar.php
+++ b/gravatar/gravatar.php
@@ -5,14 +5,14 @@
* Version: 1.1
* Author: Klaus Weidenbach
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
/**
* Installs the plugin hook
*/
function gravatar_install() {
- register_hook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
+ Addon::registerHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
logger("registered gravatar in avatar_lookup hook");
}
@@ -21,7 +21,7 @@ function gravatar_install() {
* Removes the plugin hook
*/
function gravatar_uninstall() {
- unregister_hook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
+ Addon::unregisterHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
logger("unregistered gravatar in avatar_lookup hook");
}
diff --git a/group_text/group_text.php b/group_text/group_text.php
index febb87a7..27bd173b 100644
--- a/group_text/group_text.php
+++ b/group_text/group_text.php
@@ -4,16 +4,14 @@
* Description: Disable images in group edit menu
* Version: 1.0
* Author: Thomas Willingham
- *
- *
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function group_text_install() {
- register_hook('plugin_settings', 'addon/group_text/group_text.php', 'group_text_settings');
- register_hook('plugin_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
+ Addon::registerHook('plugin_settings', 'addon/group_text/group_text.php', 'group_text_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
logger("installed group_text");
}
@@ -21,8 +19,8 @@ function group_text_install() {
function group_text_uninstall() {
- unregister_hook('plugin_settings', 'addon/group_text/group_text.php', 'group_text_settings');
- unregister_hook('plugin_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
+ Addon::unregisterHook('plugin_settings', 'addon/group_text/group_text.php', 'group_text_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
logger("removed group_text");
diff --git a/ifttt/ifttt.php b/ifttt/ifttt.php
index 8a457df3..40cc5250 100644
--- a/ifttt/ifttt.php
+++ b/ifttt/ifttt.php
@@ -11,19 +11,20 @@ require_once 'include/items.php';
require_once 'include/text.php';
use Friendica\App;
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
function ifttt_install()
{
- register_hook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
- register_hook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
+ Addon::registerHook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
+ Addon::registerHook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
}
function ifttt_uninstall()
{
- unregister_hook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
- unregister_hook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
+ Addon::unregisterHook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
+ Addon::unregisterHook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
}
function ifttt_module()
diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php
index ccd45fca..16c14a79 100644
--- a/ijpost/ijpost.php
+++ b/ijpost/ijpost.php
@@ -1,5 +1,4 @@
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function ijpost_install() {
- register_hook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
- register_hook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
- register_hook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
- register_hook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
- register_hook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
+ 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');
}
function ijpost_uninstall() {
- unregister_hook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
- unregister_hook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
- unregister_hook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
- unregister_hook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
- unregister_hook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
+ 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');
}
diff --git a/impressum/impressum.php b/impressum/impressum.php
index 75103dd1..15e33869 100644
--- a/impressum/impressum.php
+++ b/impressum/impressum.php
@@ -10,17 +10,18 @@
require_once('include/bbcode.php');
require_once('mod/proxy.php');
+use Friendica\Core\Addon;
use Friendica\Core\Config;
function impressum_install() {
- register_hook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
- register_hook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
+ Addon::registerHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
+ Addon::registerHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
logger("installed impressum plugin");
}
function impressum_uninstall() {
- unregister_hook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
- unregister_hook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
+ Addon::unregisterHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
+ Addon::unregisterHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
logger("uninstalled impressum plugin");
}
diff --git a/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php b/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php
index 5e46b3b7..cdadf030 100644
--- a/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php
+++ b/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php
@@ -5,13 +5,14 @@
* Version: 1.0
* Author: Thomas Willingham
*/
+use Friendica\Core\Addon;
function infiniteimprobabilitydrive_install() {
-register_hook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
+Addon::registerHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
}
function infiniteimprobabilitydrive_uninstall() {
-unregister_hook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
+Addon::unregisterHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
}
diff --git a/irc/irc.php b/irc/irc.php
index cfede034..e2fd50ba 100644
--- a/irc/irc.php
+++ b/irc/irc.php
@@ -6,19 +6,19 @@
* Author: tony baldwin
* Author: Tobias Diekershoff
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
function irc_install() {
- register_hook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
- register_hook('plugin_settings', 'addon/irc/irc.php', 'irc_addon_settings');
- register_hook('plugin_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post');
+ Addon::registerHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
+ Addon::registerHook('plugin_settings', 'addon/irc/irc.php', 'irc_addon_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post');
}
function irc_uninstall() {
- unregister_hook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
- unregister_hook('plugin_settings', 'addon/irc/irc.php', 'irc_addon_settings');
+ Addon::unregisterHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
+ Addon::unregisterHook('plugin_settings', 'addon/irc/irc.php', 'irc_addon_settings');
}
diff --git a/jappixmini/jappixmini.php b/jappixmini/jappixmini.php
index f42155fc..2e3cbc77 100644
--- a/jappixmini/jappixmini.php
+++ b/jappixmini/jappixmini.php
@@ -63,22 +63,23 @@
*/
use Friendica\App;
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Model\User;
function jappixmini_install()
{
- register_hook('plugin_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
- register_hook('plugin_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
+ Addon::registerHook('plugin_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
- register_hook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
- register_hook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
+ Addon::registerHook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
+ Addon::registerHook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
- register_hook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
+ Addon::registerHook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
// Jappix source download as required by AGPL
- register_hook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
+ Addon::registerHook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
// set standard configuration
$info_text = Config::get("jappixmini", "infotext");
@@ -103,15 +104,15 @@ function jappixmini_install()
function jappixmini_uninstall()
{
- unregister_hook('plugin_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
- unregister_hook('plugin_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
+ Addon::unregisterHook('plugin_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
- unregister_hook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
- unregister_hook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
+ Addon::unregisterHook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
+ Addon::unregisterHook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
- unregister_hook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
+ Addon::unregisterHook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
- unregister_hook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
+ Addon::unregisterHook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
}
function jappixmini_plugin_admin(App $a, &$o)
diff --git a/js_upload/js_upload.php b/js_upload/js_upload.php
index cc3778cd..15393e8c 100644
--- a/js_upload/js_upload.php
+++ b/js_upload/js_upload.php
@@ -15,23 +15,23 @@
* Module Author: Chris Case
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
function js_upload_install() {
- register_hook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
- register_hook('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
- register_hook('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
- register_hook('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
+ 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');
}
function js_upload_uninstall() {
- unregister_hook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
- unregister_hook('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
- unregister_hook('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
- unregister_hook('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
+ 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');
}
diff --git a/krynn/krynn.php b/krynn/krynn.php
index 17e7d2b4..93082419 100644
--- a/krynn/krynn.php
+++ b/krynn/krynn.php
@@ -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\PConfig;
function krynn_install() {
@@ -21,7 +21,7 @@ function krynn_install() {
*
*/
- register_hook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
+ Addon::registerHook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
/**
*
@@ -31,8 +31,8 @@ function krynn_install() {
*
*/
- register_hook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings');
- register_hook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
+ Addon::registerHook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
logger("installed krynn");
}
@@ -48,9 +48,9 @@ function krynn_uninstall() {
*
*/
- unregister_hook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
- unregister_hook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings');
- unregister_hook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
+ Addon::unregisterHook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
+ Addon::unregisterHook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
logger("removed krynn");
diff --git a/langfilter/langfilter.php b/langfilter/langfilter.php
index e8e90975..4bc1b232 100644
--- a/langfilter/langfilter.php
+++ b/langfilter/langfilter.php
@@ -9,6 +9,7 @@
*/
use Friendica\App;
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
/* Define the hooks we want to use
@@ -18,16 +19,16 @@ use Friendica\Core\PConfig;
function langfilter_install()
{
- register_hook('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body', 10);
- register_hook('plugin_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
- register_hook('plugin_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
+ Addon::registerHook('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body', 10);
+ Addon::registerHook('plugin_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
}
function langfilter_uninstall()
{
- unregister_hook('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body');
- unregister_hook('plugin_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
- unregister_hook('plugin_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
+ Addon::unregisterHook('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body');
+ Addon::unregisterHook('plugin_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
}
/* The settings
diff --git a/ldapauth/ldapauth.php b/ldapauth/ldapauth.php
index f6cb42b6..d06874b7 100644
--- a/ldapauth/ldapauth.php
+++ b/ldapauth/ldapauth.php
@@ -52,17 +52,18 @@
*
* ...etc.
*/
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Model\User;
function ldapauth_install()
{
- register_hook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
+ Addon::registerHook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
}
function ldapauth_uninstall()
{
- unregister_hook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
+ Addon::unregisterHook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
}
function ldapauth_hook_authenticate($a, &$b)
diff --git a/leistungsschutzrecht/leistungsschutzrecht.php b/leistungsschutzrecht/leistungsschutzrecht.php
index 91d35834..f5cee117 100644
--- a/leistungsschutzrecht/leistungsschutzrecht.php
+++ b/leistungsschutzrecht/leistungsschutzrecht.php
@@ -5,20 +5,20 @@
* Version: 0.1
* Author: Michael Vogel
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
function leistungsschutzrecht_install() {
- register_hook('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
- register_hook('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
- register_hook('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
+ 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');
}
function leistungsschutzrecht_uninstall() {
- unregister_hook('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
- unregister_hook('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
- unregister_hook('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
+ 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');
}
function leistungsschutzrecht_getsiteinfo($a, &$siteinfo) {
diff --git a/libertree/libertree.php b/libertree/libertree.php
index 0b9f839b..2909a8ef 100644
--- a/libertree/libertree.php
+++ b/libertree/libertree.php
@@ -6,23 +6,23 @@
* Version: 1.0
* Author: Tony Baldwin
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function libertree_install() {
- register_hook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
- register_hook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
- register_hook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
- register_hook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
- register_hook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
+ 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');
}
function libertree_uninstall() {
- unregister_hook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
- unregister_hook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
- unregister_hook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
- unregister_hook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
- unregister_hook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
+ 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');
}
diff --git a/libravatar/libravatar.php b/libravatar/libravatar.php
index 891b0b47..3979416f 100644
--- a/libravatar/libravatar.php
+++ b/libravatar/libravatar.php
@@ -5,7 +5,7 @@
* Version: 1.1
* Author: Klaus Weidenbach
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
/**
@@ -17,7 +17,7 @@ function libravatar_install() {
// avoid registering the hook
return false;
}
- register_hook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
+ Addon::registerHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
logger("registered libravatar in avatar_lookup hook");
}
@@ -26,7 +26,7 @@ function libravatar_install() {
* Removes the plugin hook
*/
function libravatar_uninstall() {
- unregister_hook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
+ Addon::unregisterHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
logger("unregistered libravatar in avatar_lookup hook");
}
diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php
index 1d5703e1..6f358530 100644
--- a/ljpost/ljpost.php
+++ b/ljpost/ljpost.php
@@ -1,5 +1,4 @@
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function ljpost_install() {
- register_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
- register_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
- register_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
- register_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
- register_hook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
+ 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');
}
function ljpost_uninstall() {
- unregister_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
- unregister_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
- unregister_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
- unregister_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
- unregister_hook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
+ 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');
}
diff --git a/mahjongg/mahjongg.php b/mahjongg/mahjongg.php
index 977c693d..3567792b 100644
--- a/mahjongg/mahjongg.php
+++ b/mahjongg/mahjongg.php
@@ -6,14 +6,14 @@
* Version: 1.0
* Author: Holger Froese
*/
-
+use Friendica\Core\Addon;
function mahjongg_install() {
- register_hook('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
+ Addon::registerHook('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
}
function mahjongg_uninstall() {
- unregister_hook('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
+ Addon::unregisterHook('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
}
diff --git a/mailstream/mailstream.php b/mailstream/mailstream.php
index 67364365..c427ae76 100644
--- a/mailstream/mailstream.php
+++ b/mailstream/mailstream.php
@@ -5,17 +5,17 @@
* Version: 1.1
* Author: Matthew Exon
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
function mailstream_install() {
- register_hook('plugin_settings', 'addon/mailstream/mailstream.php', 'mailstream_plugin_settings');
- register_hook('plugin_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_plugin_settings_post');
- register_hook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
- register_hook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
- register_hook('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
+ Addon::registerHook('plugin_settings', 'addon/mailstream/mailstream.php', 'mailstream_plugin_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_plugin_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');
if (Config::get('mailstream', 'dbversion') == '0.1') {
q('ALTER TABLE `mailstream_item` DROP INDEX `uid`');
@@ -52,16 +52,16 @@ function mailstream_install() {
}
function mailstream_uninstall() {
- unregister_hook('plugin_settings', 'addon/mailstream/mailstream.php', 'mailstream_plugin_settings');
- unregister_hook('plugin_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_plugin_settings_post');
- unregister_hook('post_local', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
- unregister_hook('post_remote', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
- unregister_hook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
- unregister_hook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
- unregister_hook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
- unregister_hook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
- unregister_hook('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
- unregister_hook('incoming_mail', 'addon/mailstream/mailstream.php', 'mailstream_incoming_mail');
+ Addon::unregisterHook('plugin_settings', 'addon/mailstream/mailstream.php', 'mailstream_plugin_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_plugin_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');
}
function mailstream_module() {}
diff --git a/mathjax/mathjax.php b/mathjax/mathjax.php
index 2a7bc89c..fc18b51d 100644
--- a/mathjax/mathjax.php
+++ b/mathjax/mathjax.php
@@ -7,20 +7,20 @@
* Author: Tobias Diekershoff
* License: 3-clause BSD license
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
function mathjax_install() {
- register_hook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header');
- register_hook('plugin_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings');
- register_hook('plugin_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post');
+ Addon::registerHook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header');
+ Addon::registerHook('plugin_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post');
logger('installed js_math plugin');
}
function mathjax_uninstall() {
- unregister_hook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header');
- unregister_hook('plugin_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings');
- unregister_hook('plugin_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post');
+ Addon::unregisterHook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header');
+ Addon::unregisterHook('plugin_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post');
}
function mathjax_settings_post ($a, $post) {
if (! local_user())
diff --git a/membersince/membersince.php b/membersince/membersince.php
index c995c54b..3b454fa3 100644
--- a/membersince/membersince.php
+++ b/membersince/membersince.php
@@ -7,12 +7,13 @@
* Author: Mike Macgirvin
*
*/
+use Friendica\Core\Addon;
require_once('include/datetime.php');
-function membersince_install(){ register_hook('profile_advanced','addon/membersince/membersince.php','membersince_display'); }
+function membersince_install(){ Addon::registerHook('profile_advanced','addon/membersince/membersince.php','membersince_display'); }
-function membersince_uninstall(){ unregister_hook('profile_advanced','addon/membersince/membersince.php','membersince_display'); }
+function membersince_uninstall(){ Addon::unregisterHook('profile_advanced','addon/membersince/membersince.php','membersince_display'); }
function membersince_display(&$a,&$b) {
$b = preg_replace('/<\/dl>/',"\n\n\n\n- " . t('Member since:') . "
\n- " . datetime_convert('UTC',date_default_timezone_get(),$a->profile['register_date']) . "
\n
" ,$b, 1);
diff --git a/morechoice/morechoice.php b/morechoice/morechoice.php
index d22ec3aa..b8a170a1 100644
--- a/morechoice/morechoice.php
+++ b/morechoice/morechoice.php
@@ -7,24 +7,24 @@
* - who takes no responsibility for any additional content which may appear herein
*
*/
-
+use Friendica\Core\Addon;
function morechoice_install() {
- register_hook('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
- register_hook('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
- register_hook('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
+ 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');
}
function morechoice_uninstall() {
- unregister_hook('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
- unregister_hook('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
- unregister_hook('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
+ 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');
// We need to leave this here for a while, because we now have a situation where people can end up with an orphaned hook.
- unregister_hook('poke_verbs', 'addon/morechoice/morechoice.php', 'morechoice_poke_verbs');
+ Addon::unregisterHook('poke_verbs', 'addon/morechoice/morechoice.php', 'morechoice_poke_verbs');
}
diff --git a/morepokes/morepokes.php b/morepokes/morepokes.php
index 9fd1a43e..946a486a 100644
--- a/morepokes/morepokes.php
+++ b/morepokes/morepokes.php
@@ -6,13 +6,14 @@
* Author: Thomas Willingham
*
*/
+use Friendica\Core\Addon;
function morepokes_install() {
- register_hook('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
+ Addon::registerHook('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
}
function morepokes_uninstall() {
- unregister_hook('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
+ Addon::unregisterHook('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
}
function morepokes_poke_verbs($a,&$b) {
diff --git a/namethingy/namethingy.php b/namethingy/namethingy.php
index 0ccf106c..b5faf9fd 100644
--- a/namethingy/namethingy.php
+++ b/namethingy/namethingy.php
@@ -1,5 +1,4 @@
*/
-
+use Friendica\Core\Addon;
function namethingy_install() {
- register_hook('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
+ Addon::registerHook('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
}
function namethingy_uninstall() {
- unregister_hook('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
+ Addon::unregisterHook('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
}
diff --git a/newmemberwidget/newmemberwidget.php b/newmemberwidget/newmemberwidget.php
index 41e4e0d5..b912b074 100644
--- a/newmemberwidget/newmemberwidget.php
+++ b/newmemberwidget/newmemberwidget.php
@@ -9,14 +9,15 @@
require_once('include/bbcode.php');
+use Friendica\Core\Addon;
use Friendica\Core\Config;
function newmemberwidget_install () {
- register_hook( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
+ Addon::registerHook( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
logger('newmemberwidget installed');
}
function newmemberwidget_uninstall () {
- unregister_hook( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
+ Addon::unregisterHook( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
}
function newmemberwidget_network_mod_init ( $a, $b) {
diff --git a/notimeline/notimeline.php b/notimeline/notimeline.php
index dcf96935..bc06f78b 100644
--- a/notimeline/notimeline.php
+++ b/notimeline/notimeline.php
@@ -7,20 +7,20 @@
*
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function notimeline_install() {
- register_hook('plugin_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
- register_hook('plugin_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
+ Addon::registerHook('plugin_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
}
function notimeline_uninstall() {
- unregister_hook('plugin_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
- unregister_hook('plugin_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
+ Addon::unregisterHook('plugin_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
}
diff --git a/nsfw/nsfw.php b/nsfw/nsfw.php
index 6592738d..7c37fc2e 100644
--- a/nsfw/nsfw.php
+++ b/nsfw/nsfw.php
@@ -1,6 +1,4 @@
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function nsfw_install() {
- register_hook('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body', 10);
- register_hook('plugin_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
- register_hook('plugin_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
+ Addon::registerHook('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body', 10);
+ Addon::registerHook('plugin_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
}
function nsfw_uninstall() {
- unregister_hook('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body');
- unregister_hook('plugin_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
- unregister_hook('plugin_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
+ Addon::unregisterHook('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body');
+ Addon::unregisterHook('plugin_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
}
diff --git a/numfriends/numfriends.php b/numfriends/numfriends.php
index 98295bfb..9e3463c3 100644
--- a/numfriends/numfriends.php
+++ b/numfriends/numfriends.php
@@ -4,16 +4,14 @@
* Description: Change number of contacts shown of profile sidebar
* Version: 1.0
* Author: Mike Macgirvin
- *
- *
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function numfriends_install() {
- register_hook('plugin_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
- register_hook('plugin_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
+ Addon::registerHook('plugin_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
logger("installed numfriends");
}
@@ -21,8 +19,8 @@ function numfriends_install() {
function numfriends_uninstall() {
- unregister_hook('plugin_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
- unregister_hook('plugin_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
+ Addon::unregisterHook('plugin_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
logger("removed numfriends");
diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php
index ae9cb480..d61d0020 100644
--- a/openstreetmap/openstreetmap.php
+++ b/openstreetmap/openstreetmap.php
@@ -8,27 +8,27 @@
* Author: Klaus Weidenbach
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
function openstreetmap_install()
{
- register_hook('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
- register_hook('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
- register_hook('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
- register_hook('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
+ 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('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
logger("installed openstreetmap");
}
function openstreetmap_uninstall()
{
- unregister_hook('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
- unregister_hook('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
- unregister_hook('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
- unregister_hook('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
+ 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('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
logger("removed openstreetmap");
}
diff --git a/pageheader/pageheader.php b/pageheader/pageheader.php
index 977bee4e..0a293103 100644
--- a/pageheader/pageheader.php
+++ b/pageheader/pageheader.php
@@ -1,6 +1,4 @@
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
function pageheader_install() {
- register_hook('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
- register_hook('plugin_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
- register_hook('plugin_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
+ Addon::registerHook('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
+ Addon::registerHook('plugin_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
}
function pageheader_uninstall() {
- unregister_hook('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
- unregister_hook('plugin_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
- unregister_hook('plugin_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
+ Addon::unregisterHook('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
+ Addon::unregisterHook('plugin_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
// hook moved, uninstall the old one if still there.
- unregister_hook('page_header', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
+ Addon::unregisterHook('page_header', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
}
diff --git a/piwik/piwik.php b/piwik/piwik.php
index 8253f4a7..ddba2dd9 100644
--- a/piwik/piwik.php
+++ b/piwik/piwik.php
@@ -29,17 +29,17 @@
* about http/https but beware to put the trailing / at the end of your
* setting.
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
function piwik_install() {
- register_hook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
+ Addon::registerHook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
logger("installed piwik plugin");
}
function piwik_uninstall() {
- unregister_hook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
+ Addon::unregisterHook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
logger("uninstalled piwik plugin");
}
diff --git a/planets/planets.php b/planets/planets.php
index 0d88e21d..794d1f02 100644
--- a/planets/planets.php
+++ b/planets/planets.php
@@ -6,7 +6,7 @@
* Author: Mike Macgirvin
* Author: Tony Baldwin
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function planets_install() {
@@ -18,7 +18,7 @@ function planets_install() {
*
*/
- register_hook('post_local', 'addon/planets/planets.php', 'planets_post_hook');
+ Addon::registerHook('post_local', 'addon/planets/planets.php', 'planets_post_hook');
/**
*
@@ -28,8 +28,8 @@ function planets_install() {
*
*/
- register_hook('plugin_settings', 'addon/planets/planets.php', 'planets_settings');
- register_hook('plugin_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
+ Addon::registerHook('plugin_settings', 'addon/planets/planets.php', 'planets_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
logger("installed planets");
}
@@ -45,9 +45,9 @@ function planets_uninstall() {
*
*/
- unregister_hook('post_local', 'addon/planets/planets.php', 'planets_post_hook');
- unregister_hook('plugin_settings', 'addon/planets/planets.php', 'planets_settings');
- unregister_hook('plugin_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
+ Addon::unregisterHook('post_local', 'addon/planets/planets.php', 'planets_post_hook');
+ Addon::unregisterHook('plugin_settings', 'addon/planets/planets.php', 'planets_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
logger("removed planets");
diff --git a/pledgie/pledgie.php b/pledgie/pledgie.php
index 6183c76d..27897e52 100644
--- a/pledgie/pledgie.php
+++ b/pledgie/pledgie.php
@@ -7,19 +7,19 @@
* Hauke Altmann
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
function pledgie_install() {
- register_hook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
- register_hook('plugin_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
- register_hook('plugin_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
+ Addon::registerHook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
+ Addon::registerHook('plugin_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
}
function pledgie_uninstall() {
- unregister_hook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
- unregister_hook('plugin_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
- unregister_hook('plugin_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
+ Addon::unregisterHook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
+ Addon::unregisterHook('plugin_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
}
function pledgie_addon_settings(&$a,&$s) {
diff --git a/public_server/public_server.php b/public_server/public_server.php
index 0ea029b3..422746f0 100644
--- a/public_server/public_server.php
+++ b/public_server/public_server.php
@@ -1,31 +1,30 @@
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Model\User;
function public_server_install() {
- register_hook('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
- register_hook('cron', 'addon/public_server/public_server.php', 'public_server_cron');
- register_hook('enotify','addon/public_server/public_server.php', 'public_server_enotify');
- register_hook('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
+ 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');
}
function public_server_uninstall() {
- unregister_hook('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
- unregister_hook('cron', 'addon/public_server/public_server.php', 'public_server_cron');
- unregister_hook('enotify','addon/public_server/public_server.php', 'public_server_enotify');
- unregister_hook('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
+ 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');
}
function public_server_register_account($a,$b) {
diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php
index 6aaa0565..8aa1588a 100644
--- a/pumpio/pumpio.php
+++ b/pumpio/pumpio.php
@@ -5,6 +5,7 @@
* Version: 0.2
* Author: Michael Vogel
*/
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
@@ -22,25 +23,25 @@ require_once "mod/share.php";
define('PUMPIO_DEFAULT_POLL_INTERVAL', 5); // given in minutes
function pumpio_install() {
- register_hook('post_local', 'addon/pumpio/pumpio.php', 'pumpio_post_local');
- register_hook('notifier_normal', 'addon/pumpio/pumpio.php', 'pumpio_send');
- register_hook('jot_networks', 'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
- register_hook('connector_settings', 'addon/pumpio/pumpio.php', 'pumpio_settings');
- register_hook('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
- register_hook('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
- register_hook('queue_predeliver', 'addon/pumpio/pumpio.php', 'pumpio_queue_hook');
- register_hook('check_item_notification','addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
+ 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');
}
function pumpio_uninstall() {
- unregister_hook('post_local', 'addon/pumpio/pumpio.php', 'pumpio_post_local');
- unregister_hook('notifier_normal', 'addon/pumpio/pumpio.php', 'pumpio_send');
- unregister_hook('jot_networks', 'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
- unregister_hook('connector_settings', 'addon/pumpio/pumpio.php', 'pumpio_settings');
- unregister_hook('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
- unregister_hook('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
- unregister_hook('queue_predeliver', 'addon/pumpio/pumpio.php', 'pumpio_queue_hook');
- unregister_hook('check_item_notification','addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
+ 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');
}
function pumpio_module() {}
diff --git a/qcomment/qcomment.php b/qcomment/qcomment.php
index f4b95184..2e1783c0 100644
--- a/qcomment/qcomment.php
+++ b/qcomment/qcomment.php
@@ -19,19 +19,19 @@
* them to open the comment window fully and insert the qcomment. Then "Submit" will submit it.
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function qcomment_install() {
- register_hook('plugin_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
- register_hook('plugin_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
+ Addon::registerHook('plugin_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
}
function qcomment_uninstall() {
- unregister_hook('plugin_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
- unregister_hook('plugin_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
+ Addon::unregisterHook('plugin_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
}
diff --git a/randplace/randplace.php b/randplace/randplace.php
index b696bed2..a6a639ec 100644
--- a/randplace/randplace.php
+++ b/randplace/randplace.php
@@ -18,7 +18,7 @@
* system will call the name_uninstall() function.
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function randplace_install() {
@@ -30,7 +30,7 @@ function randplace_install() {
*
*/
- register_hook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
+ Addon::registerHook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
/**
*
@@ -40,8 +40,8 @@ function randplace_install() {
*
*/
- register_hook('plugin_settings', 'addon/randplace/randplace.php', 'randplace_settings');
- register_hook('plugin_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
+ Addon::registerHook('plugin_settings', 'addon/randplace/randplace.php', 'randplace_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
logger("installed randplace");
}
@@ -57,9 +57,9 @@ function randplace_uninstall() {
*
*/
- unregister_hook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
- unregister_hook('plugin_settings', 'addon/randplace/randplace.php', 'randplace_settings');
- unregister_hook('plugin_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
+ Addon::unregisterHook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
+ Addon::unregisterHook('plugin_settings', 'addon/randplace/randplace.php', 'randplace_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
logger("removed randplace");
diff --git a/remote_permissions/remote_permissions.php b/remote_permissions/remote_permissions.php
index c7e51286..7c74df9f 100644
--- a/remote_permissions/remote_permissions.php
+++ b/remote_permissions/remote_permissions.php
@@ -6,20 +6,20 @@
* Author: Zach
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
function remote_permissions_install() {
- register_hook('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
- register_hook('plugin_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
- register_hook('plugin_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
+ Addon::registerHook('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
+ Addon::registerHook('plugin_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
}
function remote_permissions_uninstall() {
- unregister_hook('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
- unregister_hook('plugin_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
- unregister_hook('plugin_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
+ Addon::unregisterHook('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
+ Addon::unregisterHook('plugin_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
}
function remote_permissions_settings(&$a,&$o) {
diff --git a/rendertime/rendertime.php b/rendertime/rendertime.php
index 1a2a962f..0789f546 100644
--- a/rendertime/rendertime.php
+++ b/rendertime/rendertime.php
@@ -1,6 +1,4 @@
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
function rendertime_install() {
- register_hook('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
+ Addon::registerHook('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
}
function rendertime_uninstall() {
- unregister_hook('init_1', 'addon/rendertime/rendertime.php', 'rendertime_init_1');
- unregister_hook('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
+ Addon::unregisterHook('init_1', 'addon/rendertime/rendertime.php', 'rendertime_init_1');
+ Addon::unregisterHook('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
}
function rendertime_init_1(&$a) {
diff --git a/securemail/securemail.php b/securemail/securemail.php
index 68fc24ff..33bbf030 100644
--- a/securemail/securemail.php
+++ b/securemail/securemail.php
@@ -7,6 +7,7 @@
*/
use Friendica\App;
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
use Friendica\Util\Emailer;
@@ -23,19 +24,19 @@ require_once 'openpgp_crypt_symmetric.php';
function securemail_install() {
- register_hook('plugin_settings', 'addon/securemail/securemail.php', 'securemail_settings');
- register_hook('plugin_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
+ Addon::registerHook('plugin_settings', 'addon/securemail/securemail.php', 'securemail_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
- register_hook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
+ Addon::registerHook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
logger('installed securemail');
}
function securemail_uninstall() {
- unregister_hook('plugin_settings', 'addon/securemail/securemail.php', 'securemail_settings');
- unregister_hook('plugin_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
+ Addon::unregisterHook('plugin_settings', 'addon/securemail/securemail.php', 'securemail_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
- unregister_hook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
+ Addon::unregisterHook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
logger('removed securemail');
}
diff --git a/showmore/showmore.php b/showmore/showmore.php
index 9bddab63..8f0e6693 100644
--- a/showmore/showmore.php
+++ b/showmore/showmore.php
@@ -7,19 +7,19 @@
* based upon NSFW from Mike Macgirvin
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function showmore_install() {
- register_hook('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
- register_hook('plugin_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
- register_hook('plugin_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
+ Addon::registerHook('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
+ Addon::registerHook('plugin_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
}
function showmore_uninstall() {
- unregister_hook('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
- unregister_hook('plugin_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
- unregister_hook('plugin_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
+ Addon::unregisterHook('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
+ Addon::unregisterHook('plugin_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
}
function showmore_addon_settings(&$a,&$s) {
diff --git a/smiley_pack/lang/smiley_pack_es/smiley_pack_es.php b/smiley_pack/lang/smiley_pack_es/smiley_pack_es.php
index fb4bce13..47566380 100644
--- a/smiley_pack/lang/smiley_pack_es/smiley_pack_es.php
+++ b/smiley_pack/lang/smiley_pack_es/smiley_pack_es.php
@@ -6,17 +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;
function smiley_pack_es_install() {
- register_hook('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies_es');
+ Addon::registerHook('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies_es');
}
function smiley_pack_es_uninstall() {
- unregister_hook('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies');
+ Addon::unregisterHook('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies');
}
diff --git a/smiley_pack/lang/smiley_pack_fr/smiley_pack_fr.php b/smiley_pack/lang/smiley_pack_fr/smiley_pack_fr.php
index 3ae70879..282c0dde 100644
--- a/smiley_pack/lang/smiley_pack_fr/smiley_pack_fr.php
+++ b/smiley_pack/lang/smiley_pack_fr/smiley_pack_fr.php
@@ -8,13 +8,14 @@
*
*
*/
+use Friendica\Core\Addon;
function smiley_pack_fr_install() {
- register_hook('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
+ Addon::registerHook('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
}
function smiley_pack_fr_uninstall() {
- unregister_hook('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
+ Addon::unregisterHook('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
}
diff --git a/smiley_pack/smiley_pack.php b/smiley_pack/smiley_pack.php
index 4d49b7c0..ea3490eb 100644
--- a/smiley_pack/smiley_pack.php
+++ b/smiley_pack/smiley_pack.php
@@ -7,16 +7,14 @@
* All smileys from sites offering them as Public Domain
*/
-/**
-
-*/
+use Friendica\Core\Addon;
function smiley_pack_install() {
- register_hook('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
+ Addon::registerHook('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
}
function smiley_pack_uninstall() {
- unregister_hook('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
+ Addon::unregisterHook('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
}
diff --git a/smileybutton/smileybutton.php b/smileybutton/smileybutton.php
index d922a6b1..4aea34d8 100644
--- a/smileybutton/smileybutton.php
+++ b/smileybutton/smileybutton.php
@@ -5,11 +5,11 @@
* Version: 0.2
* Author: Johannes Schwab
*/
-
+use Friendica\Core\Addon;
function smileybutton_install() {
//Register hooks
- register_hook('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button');
+ Addon::registerHook('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button');
logger("installed smileybutton");
}
@@ -17,7 +17,7 @@ function smileybutton_install() {
function smileybutton_uninstall() {
//Delet registered hooks
- unregister_hook('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button');
+ Addon::unregisterHook('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button');
logger("removed smileybutton");
}
diff --git a/smilies_adult/smilies_adult.php b/smilies_adult/smilies_adult.php
index 82b30a98..bb673f23 100644
--- a/smilies_adult/smilies_adult.php
+++ b/smilies_adult/smilies_adult.php
@@ -8,13 +8,14 @@
* This is a template for how to extend the "smily" code.
*
*/
+use Friendica\Core\Addon;
function smilies_adult_install() {
- register_hook('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
+ Addon::registerHook('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
}
function smilies_adult_uninstall() {
- unregister_hook('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
+ Addon::unregisterHook('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
}
diff --git a/sniper/sniper.php b/sniper/sniper.php
index 59812cba..2be7165d 100644
--- a/sniper/sniper.php
+++ b/sniper/sniper.php
@@ -9,14 +9,14 @@
* Version: 1.0
* Author: Mike Macgirvin
*/
-
+use Friendica\Core\Addon;
function sniper_install() {
- register_hook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
+ Addon::registerHook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
}
function sniper_uninstall() {
- unregister_hook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
+ Addon::unregisterHook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
}
diff --git a/startpage/startpage.php b/startpage/startpage.php
index b0ee04cb..263ec395 100644
--- a/startpage/startpage.php
+++ b/startpage/startpage.php
@@ -6,20 +6,20 @@
* Author: Mike Macgirvin
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function startpage_install() {
- register_hook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
- register_hook('plugin_settings', 'addon/startpage/startpage.php', 'startpage_settings');
- register_hook('plugin_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
+ Addon::registerHook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
+ Addon::registerHook('plugin_settings', 'addon/startpage/startpage.php', 'startpage_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
}
function startpage_uninstall() {
- unregister_hook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
- unregister_hook('plugin_settings', 'addon/startpage/startpage.php', 'startpage_settings');
- unregister_hook('plugin_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
+ Addon::unregisterHook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
+ Addon::unregisterHook('plugin_settings', 'addon/startpage/startpage.php', 'startpage_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
}
diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php
index 9158052a..e867ea46 100644
--- a/statusnet/statusnet.php
+++ b/statusnet/statusnet.php
@@ -47,6 +47,7 @@ require_once 'include/enotify.php';
use Friendica\App;
use Friendica\Content\OEmbed;
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Model\GContact;
@@ -145,32 +146,32 @@ class StatusNetOAuth extends TwitterOAuth
function statusnet_install()
{
// we need some hooks, for the configuration and for sending tweets
- register_hook('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
- register_hook('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
- register_hook('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
- register_hook('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
- register_hook('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
- register_hook('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
- register_hook('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
- register_hook('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
+ 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('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');
logger("installed GNU Social");
}
function statusnet_uninstall()
{
- unregister_hook('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
- unregister_hook('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
- unregister_hook('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
- unregister_hook('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
- unregister_hook('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
- unregister_hook('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
- unregister_hook('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
- unregister_hook('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
+ 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('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');
// old setting - remove only
- unregister_hook('post_local_end', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
- unregister_hook('plugin_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
- unregister_hook('plugin_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
+ Addon::unregisterHook('post_local_end', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
+ Addon::unregisterHook('plugin_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
}
function statusnet_check_item_notification(App $a, &$notification_data)
diff --git a/superblock/superblock.php b/superblock/superblock.php
index c33c699d..2e1004a1 100644
--- a/superblock/superblock.php
+++ b/superblock/superblock.php
@@ -8,27 +8,27 @@
* Author: Mike Macgirvin
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function superblock_install() {
- register_hook('plugin_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
- register_hook('plugin_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
- register_hook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
- register_hook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
- register_hook('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
+ Addon::registerHook('plugin_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
+ Addon::registerHook('plugin_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');
}
function superblock_uninstall() {
- unregister_hook('plugin_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
- unregister_hook('plugin_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
- unregister_hook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
- unregister_hook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
- unregister_hook('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
+ Addon::unregisterHook('plugin_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
+ Addon::unregisterHook('plugin_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');
}
diff --git a/testdrive/testdrive.php b/testdrive/testdrive.php
index 6203f3cd..db16d214 100644
--- a/testdrive/testdrive.php
+++ b/testdrive/testdrive.php
@@ -6,27 +6,27 @@
* Version: 1.0
* Author: Mike Macgirvin
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Model\User;
function testdrive_install() {
- register_hook('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
- register_hook('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
- register_hook('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
- register_hook('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
+ 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');
}
function testdrive_uninstall() {
- unregister_hook('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
- unregister_hook('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
- unregister_hook('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
- unregister_hook('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
+ 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');
}
diff --git a/tictac/tictac.php b/tictac/tictac.php
index 99737841..f928fd5e 100644
--- a/tictac/tictac.php
+++ b/tictac/tictac.php
@@ -5,14 +5,14 @@
* Version: 1.0
* Author: Mike Macgirvin
*/
-
+use Friendica\Core\Addon;
function tictac_install() {
- register_hook('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
+ Addon::registerHook('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
}
function tictac_uninstall() {
- unregister_hook('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
+ Addon::unregisterHook('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
}
diff --git a/tumblr/tumblr.php b/tumblr/tumblr.php
index a056bd09..df47a8e3 100644
--- a/tumblr/tumblr.php
+++ b/tumblr/tumblr.php
@@ -11,23 +11,24 @@
require_once('library/OAuth1.php');
require_once('addon/tumblr/tumblroauth/tumblroauth.php');
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
function tumblr_install() {
- register_hook('post_local', 'addon/tumblr/tumblr.php', 'tumblr_post_local');
- register_hook('notifier_normal', 'addon/tumblr/tumblr.php', 'tumblr_send');
- register_hook('jot_networks', 'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
- register_hook('connector_settings', 'addon/tumblr/tumblr.php', 'tumblr_settings');
- register_hook('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
+ 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');
}
function tumblr_uninstall() {
- unregister_hook('post_local', 'addon/tumblr/tumblr.php', 'tumblr_post_local');
- unregister_hook('notifier_normal', 'addon/tumblr/tumblr.php', 'tumblr_send');
- unregister_hook('jot_networks', 'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
- unregister_hook('connector_settings', 'addon/tumblr/tumblr.php', 'tumblr_settings');
- unregister_hook('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
+ 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');
}
function tumblr_module() {}
diff --git a/twitter/twitter.php b/twitter/twitter.php
index 807445b6..1b475801 100644
--- a/twitter/twitter.php
+++ b/twitter/twitter.php
@@ -62,6 +62,7 @@
use Friendica\App;
use Friendica\Content\OEmbed;
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
@@ -78,38 +79,38 @@ define('TWITTER_DEFAULT_POLL_INTERVAL', 5); // given in minutes
function twitter_install()
{
// we need some hooks, for the configuration and for sending tweets
- register_hook('connector_settings', 'addon/twitter/twitter.php', 'twitter_settings');
- register_hook('connector_settings_post', 'addon/twitter/twitter.php', 'twitter_settings_post');
- register_hook('post_local', 'addon/twitter/twitter.php', 'twitter_post_local');
- register_hook('notifier_normal', 'addon/twitter/twitter.php', 'twitter_post_hook');
- register_hook('jot_networks', 'addon/twitter/twitter.php', 'twitter_jot_nets');
- register_hook('cron', 'addon/twitter/twitter.php', 'twitter_cron');
- register_hook('queue_predeliver', 'addon/twitter/twitter.php', 'twitter_queue_hook');
- register_hook('follow', 'addon/twitter/twitter.php', 'twitter_follow');
- register_hook('expire', 'addon/twitter/twitter.php', 'twitter_expire');
- register_hook('prepare_body', 'addon/twitter/twitter.php', 'twitter_prepare_body');
- register_hook('check_item_notification', 'addon/twitter/twitter.php', 'twitter_check_item_notification');
+ Addon::registerHook('connector_settings', 'addon/twitter/twitter.php', 'twitter_settings');
+ Addon::registerHook('connector_settings_post', 'addon/twitter/twitter.php', 'twitter_settings_post');
+ Addon::registerHook('post_local', 'addon/twitter/twitter.php', 'twitter_post_local');
+ Addon::registerHook('notifier_normal', 'addon/twitter/twitter.php', 'twitter_post_hook');
+ Addon::registerHook('jot_networks', 'addon/twitter/twitter.php', 'twitter_jot_nets');
+ Addon::registerHook('cron', 'addon/twitter/twitter.php', 'twitter_cron');
+ Addon::registerHook('queue_predeliver', 'addon/twitter/twitter.php', 'twitter_queue_hook');
+ Addon::registerHook('follow', 'addon/twitter/twitter.php', 'twitter_follow');
+ Addon::registerHook('expire', 'addon/twitter/twitter.php', 'twitter_expire');
+ Addon::registerHook('prepare_body', 'addon/twitter/twitter.php', 'twitter_prepare_body');
+ Addon::registerHook('check_item_notification', 'addon/twitter/twitter.php', 'twitter_check_item_notification');
logger("installed twitter");
}
function twitter_uninstall()
{
- unregister_hook('connector_settings', 'addon/twitter/twitter.php', 'twitter_settings');
- unregister_hook('connector_settings_post', 'addon/twitter/twitter.php', 'twitter_settings_post');
- unregister_hook('post_local', 'addon/twitter/twitter.php', 'twitter_post_local');
- unregister_hook('notifier_normal', 'addon/twitter/twitter.php', 'twitter_post_hook');
- unregister_hook('jot_networks', 'addon/twitter/twitter.php', 'twitter_jot_nets');
- unregister_hook('cron', 'addon/twitter/twitter.php', 'twitter_cron');
- unregister_hook('queue_predeliver', 'addon/twitter/twitter.php', 'twitter_queue_hook');
- unregister_hook('follow', 'addon/twitter/twitter.php', 'twitter_follow');
- unregister_hook('expire', 'addon/twitter/twitter.php', 'twitter_expire');
- unregister_hook('prepare_body', 'addon/twitter/twitter.php', 'twitter_prepare_body');
- unregister_hook('check_item_notification', 'addon/twitter/twitter.php', 'twitter_check_item_notification');
+ Addon::unregisterHook('connector_settings', 'addon/twitter/twitter.php', 'twitter_settings');
+ Addon::unregisterHook('connector_settings_post', 'addon/twitter/twitter.php', 'twitter_settings_post');
+ Addon::unregisterHook('post_local', 'addon/twitter/twitter.php', 'twitter_post_local');
+ Addon::unregisterHook('notifier_normal', 'addon/twitter/twitter.php', 'twitter_post_hook');
+ Addon::unregisterHook('jot_networks', 'addon/twitter/twitter.php', 'twitter_jot_nets');
+ Addon::unregisterHook('cron', 'addon/twitter/twitter.php', 'twitter_cron');
+ Addon::unregisterHook('queue_predeliver', 'addon/twitter/twitter.php', 'twitter_queue_hook');
+ Addon::unregisterHook('follow', 'addon/twitter/twitter.php', 'twitter_follow');
+ Addon::unregisterHook('expire', 'addon/twitter/twitter.php', 'twitter_expire');
+ Addon::unregisterHook('prepare_body', 'addon/twitter/twitter.php', 'twitter_prepare_body');
+ Addon::unregisterHook('check_item_notification', 'addon/twitter/twitter.php', 'twitter_check_item_notification');
// old setting - remove only
- unregister_hook('post_local_end', 'addon/twitter/twitter.php', 'twitter_post_hook');
- unregister_hook('plugin_settings', 'addon/twitter/twitter.php', 'twitter_settings');
- unregister_hook('plugin_settings_post', 'addon/twitter/twitter.php', 'twitter_settings_post');
+ Addon::unregisterHook('post_local_end', 'addon/twitter/twitter.php', 'twitter_post_hook');
+ Addon::unregisterHook('plugin_settings', 'addon/twitter/twitter.php', 'twitter_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/twitter/twitter.php', 'twitter_settings_post');
}
function twitter_check_item_notification(App $a, &$notification_data)
diff --git a/unicode_smilies/unicode_smilies.php b/unicode_smilies/unicode_smilies.php
index 85077c45..faa553cc 100644
--- a/unicode_smilies/unicode_smilies.php
+++ b/unicode_smilies/unicode_smilies.php
@@ -5,15 +5,15 @@
* Version: 1.0
* Author: Michael Vogel
*/
-
+use Friendica\Core\Addon;
use Friendica\Content\Smilies;
function unicode_smilies_install() {
- register_hook('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
+ Addon::registerHook('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
}
function unicode_smilies_uninstall() {
- unregister_hook('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
+ Addon::unregisterHook('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
}
function unicode_smilies_smilies(&$a,&$b) {
diff --git a/viewsrc/viewsrc.php b/viewsrc/viewsrc.php
index 623ed89d..cf1b33a7 100644
--- a/viewsrc/viewsrc.php
+++ b/viewsrc/viewsrc.php
@@ -1,6 +1,4 @@
*
*/
+use Friendica\Core\Addon;
function viewsrc_install() {
- register_hook('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
- register_hook('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
+ Addon::registerHook('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
+ Addon::registerHook('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
}
function viewsrc_uninstall() {
- unregister_hook('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
- unregister_hook('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
+ Addon::unregisterHook('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
+ Addon::unregisterHook('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
}
diff --git a/webrtc/webrtc.php b/webrtc/webrtc.php
index 1588847d..fe12248e 100644
--- a/webrtc/webrtc.php
+++ b/webrtc/webrtc.php
@@ -6,15 +6,15 @@
* Author: Stephen Mahood
* Author: Tobias Diekershoff
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
function webrtc_install() {
- register_hook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
+ Addon::registerHook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
}
function webrtc_uninstall() {
- unregister_hook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
+ Addon::unregisterHook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
}
diff --git a/widgets/widgets.php b/widgets/widgets.php
index 502278a2..69f03a8e 100644
--- a/widgets/widgets.php
+++ b/widgets/widgets.php
@@ -5,17 +5,17 @@
* Version: 1.0
* Author: Fabio Comuni
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function widgets_install() {
- register_hook('plugin_settings', 'addon/widgets/widgets.php', 'widgets_settings');
- register_hook('plugin_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
+ Addon::registerHook('plugin_settings', 'addon/widgets/widgets.php', 'widgets_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
logger("installed widgets");
}
function widgets_uninstall() {
- unregister_hook('plugin_settings', 'addon/widgets/widgets.php', 'widgets_settings');
- unregister_hook('plugin_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
+ Addon::unregisterHook('plugin_settings', 'addon/widgets/widgets.php', 'widgets_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
}
diff --git a/windowsphonepush/windowsphonepush.php b/windowsphonepush/windowsphonepush.php
index 66b23a7c..377d2cd4 100644
--- a/windowsphonepush/windowsphonepush.php
+++ b/windowsphonepush/windowsphonepush.php
@@ -26,6 +26,7 @@
* count only unseen elements which are not type=activity (likes and dislikes not seen as new elements)
*/
use Friendica\App;
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
use Friendica\Model\User;
@@ -35,15 +36,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).
*/
- register_hook('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
+ Addon::registerHook('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
/* Then we'll attach into the plugin settings page, and also the
* settings post hook so that we can create and update
* user preferences. User shall be able to activate the plugin and
* define whether he allows pushing first characters of item text
*/
- register_hook('plugin_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
- register_hook('plugin_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
+ Addon::registerHook('plugin_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
logger("installed windowsphonepush");
}
@@ -53,9 +54,9 @@ function windowsphonepush_uninstall()
/* uninstall unregisters any hooks created with register_hook
* during install. Don't delete data in table `pconfig`.
*/
- unregister_hook('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
- unregister_hook('plugin_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
- unregister_hook('plugin_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
+ Addon::unregisterHook('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
+ Addon::unregisterHook('plugin_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
logger("removed windowsphonepush");
}
diff --git a/wppost/wppost.php b/wppost/wppost.php
index 22032c90..d73005a3 100644
--- a/wppost/wppost.php
+++ b/wppost/wppost.php
@@ -6,28 +6,28 @@
* Version: 1.1
* Author: Mike Macgirvin
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\PConfig;
function wppost_install() {
- register_hook('post_local', 'addon/wppost/wppost.php', 'wppost_post_local');
- register_hook('notifier_normal', 'addon/wppost/wppost.php', 'wppost_send');
- register_hook('jot_networks', 'addon/wppost/wppost.php', 'wppost_jot_nets');
- register_hook('connector_settings', 'addon/wppost/wppost.php', 'wppost_settings');
- register_hook('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
+ 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');
}
function wppost_uninstall() {
- unregister_hook('post_local', 'addon/wppost/wppost.php', 'wppost_post_local');
- unregister_hook('notifier_normal', 'addon/wppost/wppost.php', 'wppost_send');
- unregister_hook('jot_networks', 'addon/wppost/wppost.php', 'wppost_jot_nets');
- unregister_hook('connector_settings', 'addon/wppost/wppost.php', 'wppost_settings');
- unregister_hook('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
+ 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');
// obsolete - remove
- unregister_hook('post_local_end', 'addon/wppost/wppost.php', 'wppost_send');
- unregister_hook('plugin_settings', 'addon/wppost/wppost.php', 'wppost_settings');
- unregister_hook('plugin_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
+ Addon::unregisterHook('post_local_end', 'addon/wppost/wppost.php', 'wppost_send');
+ Addon::unregisterHook('plugin_settings', 'addon/wppost/wppost.php', 'wppost_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
}
diff --git a/xmpp/xmpp.php b/xmpp/xmpp.php
index ba8c27c7..fc2d6bb5 100644
--- a/xmpp/xmpp.php
+++ b/xmpp/xmpp.php
@@ -7,23 +7,24 @@
* Author: Michael Vogel
*/
use Friendica\App;
+use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
function xmpp_install()
{
- register_hook('plugin_settings', 'addon/xmpp/xmpp.php', 'xmpp_plugin_settings');
- register_hook('plugin_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_plugin_settings_post');
- register_hook('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
- register_hook('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
+ Addon::registerHook('plugin_settings', 'addon/xmpp/xmpp.php', 'xmpp_plugin_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_plugin_settings_post');
+ Addon::registerHook('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
+ Addon::registerHook('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
}
function xmpp_uninstall()
{
- unregister_hook('plugin_settings', 'addon/xmpp/xmpp.php', 'xmpp_plugin_settings');
- unregister_hook('plugin_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_plugin_settings_post');
- unregister_hook('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
- unregister_hook('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
+ Addon::unregisterHook('plugin_settings', 'addon/xmpp/xmpp.php', 'xmpp_plugin_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_plugin_settings_post');
+ Addon::unregisterHook('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
+ Addon::unregisterHook('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
}
function xmpp_plugin_settings_post()
diff --git a/yourls/yourls.php b/yourls/yourls.php
index d5d6d234..96554bb5 100644
--- a/yourls/yourls.php
+++ b/yourls/yourls.php
@@ -8,19 +8,19 @@
* Author: Keith Fernie
*
*/
-
+use Friendica\Core\Addon;
use Friendica\Core\Config;
function yourls_install() {
- register_hook('plugin_settings', 'addon/yourls/yourls.php', 'yourls_addon_settings');
- register_hook('plugin_settings_post', 'addon/yourls/yourls.php', 'yourls_addon_settings_post');
+ Addon::registerHook('plugin_settings', 'addon/yourls/yourls.php', 'yourls_addon_settings');
+ Addon::registerHook('plugin_settings_post', 'addon/yourls/yourls.php', 'yourls_addon_settings_post');
}
function yourls_uninstall() {
- unregister_hook('plugin_settings', 'addon/yourls/yourls.php', 'yourls_addon_settings');
- unregister_hook('plugin_settings_post', 'addon/yourls/yourls.php', 'yourls_addon_settings_post');
+ Addon::unregisterHook('plugin_settings', 'addon/yourls/yourls.php', 'yourls_addon_settings');
+ Addon::unregisterHook('plugin_settings_post', 'addon/yourls/yourls.php', 'yourls_addon_settings_post');
Config::set('yourls','url1',trim($_POST['']));
Config::set('yourls','username1',trim($_POST['']));
Config::set('yourls','password1',trim($_POST['']));