Replace deprecated Addon::*registerHook by Hook::*register

This commit is contained in:
Hypolite Petovan 2018-12-26 02:28:16 -05:00
parent eaeb834819
commit c27b1cb66f
82 changed files with 625 additions and 630 deletions

View File

@ -36,8 +36,8 @@
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Content\Text\Markdown;
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
@ -60,9 +60,9 @@ require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'a
function advancedcontentfilter_install()
{
Addon::registerHook('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
Addon::registerHook('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
Addon::registerHook('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings');
Hook::register('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
Hook::register('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
Hook::register('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings');
DBStructure::update(false, true);
@ -71,9 +71,9 @@ function advancedcontentfilter_install()
function advancedcontentfilter_uninstall()
{
Addon::unregisterHook('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
Addon::unregisterHook('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
Addon::unregisterHook('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings');
Hook::unregister('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
Hook::unregister('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
Hook::unregister('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings');
}
/*

View File

@ -50,17 +50,17 @@
*/
use Friendica\Core\Config;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
function blackout_install() {
Addon::registerHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
Hook::register('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
}
function blackout_uninstall() {
Addon::unregisterHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
Hook::unregister('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
}
function blackout_redirect ($a, $b) {
// if we have a logged in user, don't throw her out

View File

@ -8,32 +8,32 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Util\Strings;
function blockem_install()
{
Addon::registerHook('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
Addon::registerHook('display_item' , 'addon/blockem/blockem.php', 'blockem_display_item');
Addon::registerHook('addon_settings' , 'addon/blockem/blockem.php', 'blockem_addon_settings');
Addon::registerHook('addon_settings_post' , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
Addon::registerHook('conversation_start' , 'addon/blockem/blockem.php', 'blockem_conversation_start');
Addon::registerHook('item_photo_menu' , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
Addon::registerHook('enotify_store' , 'addon/blockem/blockem.php', 'blockem_enotify_store');
Hook::register('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
Hook::register('display_item' , 'addon/blockem/blockem.php', 'blockem_display_item');
Hook::register('addon_settings' , 'addon/blockem/blockem.php', 'blockem_addon_settings');
Hook::register('addon_settings_post' , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
Hook::register('conversation_start' , 'addon/blockem/blockem.php', 'blockem_conversation_start');
Hook::register('item_photo_menu' , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
Hook::register('enotify_store' , 'addon/blockem/blockem.php', 'blockem_enotify_store');
}
function blockem_uninstall()
{
Addon::unregisterHook('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
Addon::unregisterHook('prepare_body' , 'addon/blockem/blockem.php', 'blockem_prepare_body');
Addon::unregisterHook('display_item' , 'addon/blockem/blockem.php', 'blockem_display_item');
Addon::unregisterHook('addon_settings' , 'addon/blockem/blockem.php', 'blockem_addon_settings');
Addon::unregisterHook('addon_settings_post' , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
Addon::unregisterHook('conversation_start' , 'addon/blockem/blockem.php', 'blockem_conversation_start');
Addon::unregisterHook('item_photo_menu' , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
Addon::unregisterHook('enotify_store' , 'addon/blockem/blockem.php', 'blockem_enotify_store');
Hook::unregister('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
Hook::unregister('prepare_body' , 'addon/blockem/blockem.php', 'blockem_prepare_body');
Hook::unregister('display_item' , 'addon/blockem/blockem.php', 'blockem_display_item');
Hook::unregister('addon_settings' , 'addon/blockem/blockem.php', 'blockem_addon_settings');
Hook::unregister('addon_settings_post' , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
Hook::unregister('conversation_start' , 'addon/blockem/blockem.php', 'blockem_conversation_start');
Hook::unregister('item_photo_menu' , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
Hook::unregister('enotify_store' , 'addon/blockem/blockem.php', 'blockem_enotify_store');
}
function blockem_addon_settings (App $a, &$s)

View File

@ -8,7 +8,7 @@
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -17,27 +17,27 @@ use Friendica\Util\XML;
function blogger_install()
{
Addon::registerHook('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
Addon::registerHook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
Addon::registerHook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
Addon::registerHook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
Addon::registerHook('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Addon::registerHook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
Hook::register('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
Hook::register('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
Hook::register('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
Hook::register('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
Hook::register('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Hook::register('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
}
function blogger_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
Addon::unregisterHook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
Addon::unregisterHook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
Addon::unregisterHook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Addon::unregisterHook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
Hook::unregister('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
Hook::unregister('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
Hook::unregister('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
Hook::unregister('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
Hook::unregister('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Hook::unregister('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
// obsolete - remove
Addon::unregisterHook('post_local_end', 'addon/blogger/blogger.php', 'blogger_send');
Addon::unregisterHook('addon_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Addon::unregisterHook('addon_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
Hook::unregister('post_local_end', 'addon/blogger/blogger.php', 'blogger_send');
Hook::unregister('addon_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Hook::unregister('addon_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
}

View File

@ -8,9 +8,8 @@
require 'addon/buffer/bufferapp.php';
use Friendica\App;
use Friendica\Content\Text\Plaintext;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -23,22 +22,22 @@ use Friendica\Util\Strings;
function buffer_install()
{
Addon::registerHook('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
Addon::registerHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Addon::registerHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Addon::registerHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
Addon::registerHook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
Addon::registerHook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
Hook::register('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
Hook::register('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Hook::register('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Hook::register('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
Hook::register('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
Hook::register('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
}
function buffer_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
Addon::unregisterHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Addon::unregisterHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Addon::unregisterHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
Addon::unregisterHook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
Hook::unregister('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
Hook::unregister('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Hook::unregister('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Hook::unregister('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
Hook::unregister('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
Hook::unregister('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
}
function buffer_module()

View File

@ -7,17 +7,17 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
function buglink_install()
{
Addon::registerHook('page_end', 'addon/buglink/buglink.php', 'buglink_active');
Hook::register('page_end', 'addon/buglink/buglink.php', 'buglink_active');
}
function buglink_uninstall()
{
Addon::unregisterHook('page_end', 'addon/buglink/buglink.php', 'buglink_active');
Hook::unregister('page_end', 'addon/buglink/buglink.php', 'buglink_active');
}
function buglink_active(App $a, &$b)

View File

@ -5,14 +5,14 @@
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
function calc_install() {
Addon::registerHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
Hook::register('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}
function calc_uninstall() {
Addon::unregisterHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
Hook::unregister('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}

View File

@ -7,8 +7,8 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -26,9 +26,9 @@ define("CATAVATAR_SIZE", 256);
*/
function catavatar_install()
{
Addon::registerHook('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
Addon::registerHook('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
Hook::register('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
Hook::register('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
Hook::register('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
Logger::log('registered catavatar');
}
@ -38,9 +38,9 @@ function catavatar_install()
*/
function catavatar_uninstall()
{
Addon::unregisterHook('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
Addon::unregisterHook('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
Hook::unregister('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
Hook::unregister('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
Hook::unregister('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
Logger::log('unregistered catavatar');
}

View File

@ -5,14 +5,14 @@
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
function convert_install() {
Addon::registerHook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
Hook::register('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
}
function convert_uninstall() {
Addon::unregisterHook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
Hook::unregister('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
}
function convert_app_menu($a,&$b) {

View File

@ -12,9 +12,9 @@
require_once 'include/text.php';
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
@ -23,16 +23,16 @@ use Friendica\Util\Proxy as ProxyUtils;
function curweather_install()
{
Addon::registerHook('network_mod_init' , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
Addon::registerHook('addon_settings' , 'addon/curweather/curweather.php', 'curweather_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
Hook::register('network_mod_init' , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
Hook::register('addon_settings' , 'addon/curweather/curweather.php', 'curweather_addon_settings');
Hook::register('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
}
function curweather_uninstall()
{
Addon::unregisterHook('network_mod_init' , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
Addon::unregisterHook('addon_settings' , 'addon/curweather/curweather.php', 'curweather_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
Hook::unregister('network_mod_init' , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
Hook::unregister('addon_settings' , 'addon/curweather/curweather.php', 'curweather_addon_settings');
Hook::unregister('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
}
// get the weather data from OpenWeatherMap

View File

@ -11,7 +11,7 @@ require_once 'addon/diaspora/Diaspora_Connection.php';
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -21,24 +21,24 @@ use Friendica\Model\Queue;
function diaspora_install()
{
Addon::registerHook('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
Addon::registerHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
Addon::registerHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
Addon::registerHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
Addon::registerHook('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
Addon::registerHook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
Addon::registerHook('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
Hook::register('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
Hook::register('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
Hook::register('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
Hook::register('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
Hook::register('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
Hook::register('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
Hook::register('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
}
function diaspora_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
Addon::unregisterHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
Addon::unregisterHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
Addon::unregisterHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
Addon::unregisterHook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
Addon::unregisterHook('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
Hook::unregister('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
Hook::unregister('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
Hook::unregister('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
Hook::unregister('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
Hook::unregister('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
Hook::unregister('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
Hook::unregister('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
}
function diaspora_jot_nets(App $a, &$b)

View File

@ -10,7 +10,7 @@
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -21,20 +21,20 @@ use Friendica\Util\XML;
function dwpost_install()
{
Addon::registerHook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
Addon::registerHook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
Addon::registerHook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
Addon::registerHook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
Addon::registerHook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
Hook::register('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
Hook::register('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
Hook::register('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
Hook::register('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
Hook::register('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
}
function dwpost_uninstall()
{
Addon::unregisterHook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
Addon::unregisterHook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
Addon::unregisterHook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
Addon::unregisterHook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
Hook::unregister('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
Hook::unregister('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
Hook::unregister('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
Hook::unregister('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
Hook::unregister('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
}
function dwpost_jot_nets(App $a, &$b)

View File

@ -6,7 +6,7 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
* Status: Unsupported
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Util\Network;
// IMPORTANT: SET THIS to your fortunate server
@ -15,7 +15,7 @@ define('FORTUNATE_SERVER', 'hostname.com');
function fortunate_install()
{
Addon::registerHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
Hook::register('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
if (FORTUNATE_SERVER == 'hostname.com' && is_site_admin()) {
notice('Fortunate addon requires configuration. See README');
}
@ -23,7 +23,7 @@ function fortunate_install()
function fortunate_uninstall()
{
Addon::unregisterHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
Hook::unregister('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
}

View File

@ -10,8 +10,8 @@ use Friendica\App;
use Friendica\Content\Nav;
use Friendica\Content\Pager;
use Friendica\Content\Widget;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
@ -26,12 +26,12 @@ require_once 'include/text.php';
function forumdirectory_install()
{
Addon::registerHook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
Hook::register('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
}
function forumdirectory_uninstall()
{
Addon::unregisterHook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
Hook::unregister('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
}
function forumdirectory_module()

View File

@ -6,25 +6,25 @@
* Author: Commander Zot
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
function fromapp_install()
{
Addon::registerHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
Addon::registerHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
Addon::registerHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
Hook::register('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
Hook::register('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
Hook::register('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
Logger::log("installed fromapp");
}
function fromapp_uninstall()
{
Addon::unregisterHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
Addon::unregisterHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
Addon::unregisterHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
Hook::unregister('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
Hook::unregister('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
Hook::unregister('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
Logger::log("removed fromapp");
}

View File

@ -9,8 +9,8 @@
define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -26,19 +26,19 @@ require_once 'mod/parse_url.php';
require_once 'include/text.php';
function fromgplus_install() {
Addon::registerHook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Addon::registerHook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
Addon::registerHook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
Hook::register('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Hook::register('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
Hook::register('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
}
function fromgplus_uninstall() {
Addon::unregisterHook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Addon::unregisterHook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
Addon::unregisterHook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
Hook::unregister('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Hook::unregister('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
Hook::unregister('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
// Old hooks
Addon::unregisterHook('addon_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
Hook::unregister('addon_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Hook::unregister('addon_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
}
function fromgplus_addon_settings(&$a,&$s) {

View File

@ -5,9 +5,9 @@
* Version: 0.1
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
*/
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
@ -16,15 +16,15 @@ use Friendica\Util\Strings;
function geocoordinates_install()
{
Addon::registerHook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
Addon::registerHook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
Hook::register('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
Hook::register('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
}
function geocoordinates_uninstall()
{
Addon::unregisterHook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
Addon::unregisterHook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
Hook::unregister('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
Hook::unregister('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
}
function geocoordinates_resolve_item(&$item)

View File

@ -21,8 +21,8 @@
* system will call the name_uninstall() function.
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -31,7 +31,7 @@ use Friendica\Util\XML;
function geonames_install() {
Addon::registerHook('load_config', 'addon/geonames/geonames.php', 'geonames_load_config');
Hook::register('load_config', 'addon/geonames/geonames.php', 'geonames_load_config');
/**
*
@ -40,7 +40,7 @@ function geonames_install() {
*
*/
Addon::registerHook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
Hook::register('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
/**
*
@ -50,8 +50,8 @@ function geonames_install() {
*
*/
Addon::registerHook('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
Addon::registerHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
Hook::register('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
Hook::register('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
Logger::log("installed geonames");
}
@ -67,10 +67,10 @@ function geonames_uninstall() {
*
*/
Addon::unregisterHook('load_config', 'addon/geonames/geonames.php', 'geonames_load_config');
Addon::unregisterHook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
Addon::unregisterHook('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
Addon::unregisterHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
Hook::unregister('load_config', 'addon/geonames/geonames.php', 'geonames_load_config');
Hook::unregister('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
Hook::unregister('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
Hook::unregister('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
Logger::log("removed geonames");

View File

@ -7,16 +7,16 @@
*
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
function gnot_install() {
Addon::registerHook('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
Addon::registerHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
Addon::registerHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
Hook::register('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
Hook::register('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
Hook::register('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
Logger::log("installed gnot");
}
@ -24,9 +24,9 @@ function gnot_install() {
function gnot_uninstall() {
Addon::unregisterHook('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
Addon::unregisterHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
Addon::unregisterHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
Hook::unregister('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
Hook::unregister('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
Hook::unregister('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
Logger::log("removed gnot");

View File

@ -6,20 +6,19 @@
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
function googlemaps_install()
{
Addon::registerHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
Hook::register('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
Logger::log("installed googlemaps");
}
function googlemaps_uninstall()
{
Addon::unregisterHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
Hook::unregister('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
Logger::log("removed googlemaps");
}

View File

@ -8,21 +8,20 @@
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Util\Security;
use Friendica\Util\Strings;
/**
* Installs the addon hook
*/
function gravatar_install() {
Addon::registerHook('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
Addon::registerHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
Hook::register('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
Hook::register('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
Logger::log("registered gravatar in avatar_lookup hook");
}
@ -31,8 +30,8 @@ function gravatar_install() {
* Removes the addon hook
*/
function gravatar_uninstall() {
Addon::unregisterHook('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
Addon::unregisterHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
Hook::unregister('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
Hook::unregister('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
Logger::log("unregistered gravatar in avatar_lookup hook");
}

View File

@ -5,15 +5,15 @@
* Version: 1.0
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
function group_text_install() {
Addon::registerHook('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
Addon::registerHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
Hook::register('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
Hook::register('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
Logger::log("installed group_text");
}
@ -21,8 +21,8 @@ function group_text_install() {
function group_text_uninstall() {
Addon::unregisterHook('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
Addon::unregisterHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
Hook::unregister('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
Hook::unregister('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
Logger::log("removed group_text");

View File

@ -7,18 +7,18 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
function highlightjs_install()
{
Addon::registerHook('head' , __FILE__, 'highlightjs_head');
Addon::registerHook('footer', __FILE__, 'highlightjs_footer');
Hook::register('head' , __FILE__, 'highlightjs_head');
Hook::register('footer', __FILE__, 'highlightjs_footer');
}
function highlightjs_uninstall()
{
Addon::unregisterHook('head' , __FILE__, 'highlightjs_head');
Addon::unregisterHook('footer', __FILE__, 'highlightjs_footer');
Hook::unregister('head' , __FILE__, 'highlightjs_head');
Hook::unregister('footer', __FILE__, 'highlightjs_footer');
}
function highlightjs_head(App $a, &$b)

View File

@ -11,7 +11,7 @@ require_once 'include/items.php';
require_once 'include/text.php';
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -22,14 +22,14 @@ use Friendica\Util\Strings;
function ifttt_install()
{
Addon::registerHook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
Addon::registerHook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
Hook::register('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
Hook::register('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
}
function ifttt_uninstall()
{
Addon::unregisterHook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
Addon::unregisterHook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
Hook::unregister('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
Hook::unregister('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
}
function ifttt_module()

View File

@ -9,7 +9,7 @@
*/
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -19,20 +19,20 @@ use Friendica\Util\XML;
function ijpost_install()
{
Addon::registerHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
Addon::registerHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
Addon::registerHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
Addon::registerHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
Addon::registerHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
Hook::register('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
Hook::register('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
Hook::register('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
Hook::register('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
Hook::register('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
}
function ijpost_uninstall()
{
Addon::unregisterHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
Addon::unregisterHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
Addon::unregisterHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
Addon::unregisterHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
Hook::unregister('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
Hook::unregister('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
Hook::unregister('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
Hook::unregister('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
Hook::unregister('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
}
function ijpost_jot_nets(&$a, &$b)

View File

@ -8,8 +8,8 @@
*/
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
@ -17,16 +17,16 @@ use Friendica\Util\Proxy as ProxyUtils;
use Friendica\Util\Strings;
function impressum_install() {
Addon::registerHook('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
Addon::registerHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
Addon::registerHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
Hook::register('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
Hook::register('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
Hook::register('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
Logger::log("installed impressum Addon");
}
function impressum_uninstall() {
Addon::unregisterHook('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
Addon::unregisterHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
Addon::unregisterHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
Hook::unregister('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
Hook::unregister('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
Hook::unregister('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
Logger::log("uninstalled impressum Addon");
}

View File

@ -5,17 +5,17 @@
* Version: 1.0
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
function infiniteimprobabilitydrive_install()
{
Addon::registerHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
Hook::register('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
}
function infiniteimprobabilitydrive_uninstall()
{
Addon::unregisterHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
Hook::unregister('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
}
function infiniteimprobabilitydrive_app_menu($a, &$b)

View File

@ -6,21 +6,21 @@
* Author: tony baldwin <https://free-haven.org/profile/tony>
* Author: Tobias Diekershoff <https://f.diekershoff.de/u/tobias>
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
function irc_install() {
Addon::registerHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
Addon::registerHook('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post');
Hook::register('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
Hook::register('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
Hook::register('addon_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post');
}
function irc_uninstall() {
Addon::unregisterHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
Addon::unregisterHook('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
Hook::unregister('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
Hook::unregister('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
}

View File

@ -63,8 +63,8 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -75,16 +75,16 @@ use Friendica\Util\Network;
function jappixmini_install()
{
Addon::registerHook('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
Addon::registerHook('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
Hook::register('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
Hook::register('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
Addon::registerHook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
Addon::registerHook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
Hook::register('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
Hook::register('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
Addon::registerHook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
Hook::register('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
// Jappix source download as required by AGPL
Addon::registerHook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
Hook::register('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
// set standard configuration
$info_text = Config::get("jappixmini", "infotext");
@ -109,15 +109,15 @@ function jappixmini_install()
function jappixmini_uninstall()
{
Addon::unregisterHook('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
Addon::unregisterHook('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
Hook::unregister('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
Hook::unregister('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
Addon::unregisterHook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
Addon::unregisterHook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
Hook::unregister('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
Hook::unregister('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
Addon::unregisterHook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
Hook::unregister('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
Addon::unregisterHook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
Hook::unregister('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
}
function jappixmini_addon_admin(App $a, &$o)

View File

@ -14,24 +14,24 @@
* Module Author: Chris Case
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
function js_upload_install() {
Addon::registerHook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
Addon::registerHook('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
Addon::registerHook('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
Addon::registerHook('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
Hook::register('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
Hook::register('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
Hook::register('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
Hook::register('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
}
function js_upload_uninstall() {
Addon::unregisterHook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
Addon::unregisterHook('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
Addon::unregisterHook('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
Addon::unregisterHook('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
Hook::unregister('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
Hook::unregister('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
Hook::unregister('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
Hook::unregister('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
}

View File

@ -9,7 +9,7 @@
*
*"My body was my sacrifice... for my magic. This damage is permanent." - Raistlin Majere
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -23,7 +23,7 @@ function krynn_install() {
*
*/
Addon::registerHook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
Hook::register('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
/**
*
@ -33,8 +33,8 @@ function krynn_install() {
*
*/
Addon::registerHook('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
Addon::registerHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
Hook::register('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
Hook::register('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
Logger::log("installed krynn");
}
@ -50,9 +50,9 @@ function krynn_uninstall() {
*
*/
Addon::unregisterHook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
Addon::unregisterHook('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
Addon::unregisterHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
Hook::unregister('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
Hook::unregister('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
Hook::unregister('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
Logger::log("removed krynn");

View File

@ -9,7 +9,7 @@
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
@ -21,17 +21,17 @@ use Friendica\Core\Renderer;
function langfilter_install()
{
Addon::registerHook('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter', 10);
Addon::registerHook('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
Hook::register('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter', 10);
Hook::register('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
Hook::register('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
}
function langfilter_uninstall()
{
Addon::unregisterHook('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter');
Addon::unregisterHook('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body');
Addon::unregisterHook('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
Hook::unregister('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter');
Hook::unregister('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body');
Hook::unregister('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
Hook::unregister('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
}
/* The settings

View File

@ -53,21 +53,21 @@
*
* ...etc.
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Model\User;
function ldapauth_install()
{
Addon::registerHook('load_config', 'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
Addon::registerHook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
Hook::register('load_config', 'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
Hook::register('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
}
function ldapauth_uninstall()
{
Addon::unregisterHook('load_config', 'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
Addon::unregisterHook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
Hook::unregister('load_config', 'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
Hook::unregister('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
}
function ldapauth_load_config(\Friendica\App $a)

View File

@ -5,22 +5,22 @@
* Version: 0.1
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Util\Network;
function leistungsschutzrecht_install() {
Addon::registerHook('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
Addon::registerHook('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
Addon::registerHook('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
Hook::register('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
Hook::register('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
Hook::register('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
}
function leistungsschutzrecht_uninstall() {
Addon::unregisterHook('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
Addon::unregisterHook('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
Addon::unregisterHook('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
Hook::unregister('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
Hook::unregister('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
Hook::unregister('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
}
function leistungsschutzrecht_getsiteinfo($a, &$siteinfo) {

View File

@ -8,7 +8,7 @@
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -17,22 +17,22 @@ use Friendica\Util\Network;
function libertree_install()
{
Addon::registerHook('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork');
Addon::registerHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Addon::registerHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Addon::registerHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Addon::registerHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Addon::registerHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
Hook::register('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork');
Hook::register('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Hook::register('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Hook::register('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Hook::register('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Hook::register('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
}
function libertree_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork');
Addon::unregisterHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Addon::unregisterHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Addon::unregisterHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Addon::unregisterHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
Hook::unregister('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork');
Hook::unregister('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Hook::unregister('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Hook::unregister('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Hook::unregister('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Hook::unregister('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
}
function libertree_jot_nets(&$a,&$b) {

View File

@ -8,13 +8,12 @@
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Util\Security;
use Friendica\Util\Strings;
/**
@ -22,8 +21,8 @@ use Friendica\Util\Strings;
*/
function libravatar_install()
{
Addon::registerHook('load_config', 'addon/libravatar/libravatar.php', 'libravatar_load_config');
Addon::registerHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
Hook::register('load_config', 'addon/libravatar/libravatar.php', 'libravatar_load_config');
Hook::register('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
Logger::log("registered libravatar in avatar_lookup hook");
}
@ -32,8 +31,8 @@ function libravatar_install()
*/
function libravatar_uninstall()
{
Addon::unregisterHook('load_config', 'addon/libravatar/libravatar.php', 'libravatar_load_config');
Addon::unregisterHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
Hook::unregister('load_config', 'addon/libravatar/libravatar.php', 'libravatar_load_config');
Hook::unregister('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
Logger::log("unregistered libravatar in avatar_lookup hook");
}

View File

@ -9,7 +9,7 @@
*/
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -18,19 +18,19 @@ use Friendica\Util\Network;
use Friendica\Util\XML;
function ljpost_install() {
Addon::registerHook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
Addon::registerHook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
Addon::registerHook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
Addon::registerHook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
Addon::registerHook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
Hook::register('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
Hook::register('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
Hook::register('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
Hook::register('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
Hook::register('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
}
function ljpost_uninstall() {
Addon::unregisterHook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
Addon::unregisterHook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
Addon::unregisterHook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
Addon::unregisterHook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
Hook::unregister('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
Hook::unregister('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
Hook::unregister('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
Hook::unregister('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
Hook::unregister('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
}

View File

@ -6,14 +6,14 @@
* Version: 1.0
* Author: Holger Froese
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
function mahjongg_install() {
Addon::registerHook('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
Hook::register('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
}
function mahjongg_uninstall() {
Addon::unregisterHook('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
Hook::unregister('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
}

View File

@ -7,8 +7,8 @@
*/
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -18,11 +18,11 @@ use Friendica\Util\Network;
use Friendica\Model\Item;
function mailstream_install() {
Addon::registerHook('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post');
Addon::registerHook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
Addon::registerHook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
Addon::registerHook('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
Hook::register('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings');
Hook::register('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post');
Hook::register('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
Hook::register('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
Hook::register('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
if (Config::get('mailstream', 'dbversion') == '0.1') {
q('ALTER TABLE `mailstream_item` DROP INDEX `uid`');
@ -59,16 +59,16 @@ function mailstream_install() {
}
function mailstream_uninstall() {
Addon::unregisterHook('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post');
Addon::unregisterHook('post_local', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
Addon::unregisterHook('post_remote', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
Addon::unregisterHook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
Addon::unregisterHook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
Addon::unregisterHook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
Addon::unregisterHook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
Addon::unregisterHook('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
Addon::unregisterHook('incoming_mail', 'addon/mailstream/mailstream.php', 'mailstream_incoming_mail');
Hook::unregister('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings');
Hook::unregister('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post');
Hook::unregister('post_local', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
Hook::unregister('post_remote', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
Hook::unregister('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
Hook::unregister('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
Hook::unregister('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
Hook::unregister('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
Hook::unregister('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
Hook::unregister('incoming_mail', 'addon/mailstream/mailstream.php', 'mailstream_incoming_mail');
}
function mailstream_module() {}

View File

@ -11,31 +11,31 @@
use Friendica\App;
use Friendica\Content\Smilies;
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\Protocol;
use Friendica\Util\Network;
use Friendica\Util\Proxy as ProxyUtils;
function mastodoncustomemojis_install()
{
Addon::registerHook('put_item_in_cache', __FILE__, 'mastodoncustomemojis_put_item_in_cache');
Addon::registerHook('network_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Addon::registerHook('display_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Addon::registerHook('search_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Addon::registerHook('community_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Addon::registerHook('contacts_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Hook::register('put_item_in_cache', __FILE__, 'mastodoncustomemojis_put_item_in_cache');
Hook::register('network_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Hook::register('display_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Hook::register('search_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Hook::register('community_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Hook::register('contacts_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
}
function mastodoncustomemojis_uninstall()
{
Addon::unregisterHook('put_item_in_cache', __FILE__, 'mastodoncustomemojis_put_item_in_cache');
Addon::unregisterHook('network_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Addon::unregisterHook('display_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Addon::unregisterHook('search_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Addon::unregisterHook('community_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Addon::unregisterHook('contacts_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Hook::unregister('put_item_in_cache', __FILE__, 'mastodoncustomemojis_put_item_in_cache');
Hook::unregister('network_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Hook::unregister('display_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Hook::unregister('search_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Hook::unregister('community_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
Hook::unregister('contacts_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
}
function mastodoncustomemojis_css_hook(App $a)

View File

@ -9,28 +9,28 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
function mathjax_install()
{
Addon::registerHook('footer' , __FILE__, 'mathjax_footer');
Addon::registerHook('addon_settings' , __FILE__, 'mathjax_settings');
Addon::registerHook('addon_settings_post', __FILE__, 'mathjax_settings_post');
Hook::register('footer' , __FILE__, 'mathjax_footer');
Hook::register('addon_settings' , __FILE__, 'mathjax_settings');
Hook::register('addon_settings_post', __FILE__, 'mathjax_settings_post');
}
function mathjax_uninstall()
{
Addon::unregisterHook('footer' , __FILE__, 'mathjax_footer');
Addon::unregisterHook('addon_settings' , __FILE__, 'mathjax_settings');
Addon::unregisterHook('addon_settings_post', __FILE__, 'mathjax_settings_post');
Hook::unregister('footer' , __FILE__, 'mathjax_footer');
Hook::unregister('addon_settings' , __FILE__, 'mathjax_settings');
Hook::unregister('addon_settings_post', __FILE__, 'mathjax_settings_post');
// Legacy hooks
Addon::unregisterHook('load_config' , __FILE__, 'mathjax_load_config');
Addon::unregisterHook('page_header' , __FILE__, 'mathjax_page_header');
Addon::unregisterHook('template_vars' , __FILE__, 'mathjax_template_vars');
Hook::unregister('load_config' , __FILE__, 'mathjax_load_config');
Hook::unregister('page_header' , __FILE__, 'mathjax_page_header');
Hook::unregister('template_vars' , __FILE__, 'mathjax_template_vars');
}
function mathjax_settings_post($a)

View File

@ -7,18 +7,18 @@
* Status: Unsupported
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Util\DateTimeFormat;
function membersince_install()
{
Addon::registerHook('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
Hook::register('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
}
function membersince_uninstall()
{
Addon::unregisterHook('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
Hook::unregister('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
}
function membersince_display(Friendica\App $a, &$b)

View File

@ -8,26 +8,25 @@
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
function morechoice_install() {
Addon::registerHook('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
Addon::registerHook('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
Addon::registerHook('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
Hook::register('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
Hook::register('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
Hook::register('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
}
function morechoice_uninstall() {
Addon::unregisterHook('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
Addon::unregisterHook('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
Addon::unregisterHook('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
Hook::unregister('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
Hook::unregister('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
Hook::unregister('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
// We need to leave this here for a while, because we now have a situation where people can end up with an orphaned hook.
Addon::unregisterHook('poke_verbs', 'addon/morechoice/morechoice.php', 'morechoice_poke_verbs');
Hook::unregister('poke_verbs', 'addon/morechoice/morechoice.php', 'morechoice_poke_verbs');
}

View File

@ -6,17 +6,17 @@
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
function morepokes_install()
{
Addon::registerHook('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
Hook::register('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
}
function morepokes_uninstall()
{
Addon::unregisterHook('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
Hook::unregister('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
}
function morepokes_poke_verbs($a, &$b)

View File

@ -7,14 +7,14 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
* Status: Unsupported
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
function namethingy_install() {
Addon::registerHook('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
Hook::register('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
}
function namethingy_uninstall() {
Addon::unregisterHook('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
Hook::unregister('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
}

View File

@ -7,8 +7,8 @@
***/
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
@ -16,13 +16,13 @@ use Friendica\Util\Strings;
function newmemberwidget_install()
{
Addon::registerHook( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
Hook::register( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
Logger::log('newmemberwidget installed');
}
function newmemberwidget_uninstall()
{
Addon::unregisterHook( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
Hook::unregister( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
}
function newmemberwidget_network_mod_init ($a, $b)

View File

@ -7,20 +7,20 @@
* Status: Unsupported
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function notimeline_install()
{
Addon::registerHook('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
Addon::registerHook('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
Hook::register('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
Hook::register('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
}
function notimeline_uninstall()
{
Addon::unregisterHook('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
Addon::unregisterHook('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
Hook::unregister('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
Hook::unregister('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
}
function notimeline_settings_post($a, $post)

View File

@ -7,23 +7,23 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function nsfw_install()
{
Addon::registerHook('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter', 10);
Addon::registerHook('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
Hook::register('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter', 10);
Hook::register('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
Hook::register('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
}
function nsfw_uninstall()
{
Addon::unregisterHook('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter');
Addon::unregisterHook('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body');
Addon::unregisterHook('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
Hook::unregister('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter');
Hook::unregister('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body');
Hook::unregister('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
Hook::unregister('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
}
// This function isn't perfect and isn't trying to preserve the html structure - it's just a

View File

@ -5,15 +5,15 @@
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
function numfriends_install() {
Addon::registerHook('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
Addon::registerHook('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
Hook::register('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
Hook::register('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
Logger::log("installed numfriends");
}
@ -21,8 +21,8 @@ function numfriends_install() {
function numfriends_uninstall() {
Addon::unregisterHook('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
Addon::unregisterHook('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
Hook::unregister('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
Hook::unregister('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
Logger::log("removed numfriends");

View File

@ -8,9 +8,9 @@
* Author: Klaus Weidenbach
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
@ -25,24 +25,24 @@ const OSM_MARKER = 0;
function openstreetmap_install()
{
Addon::registerHook('load_config', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_load_config');
Addon::registerHook('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
Addon::registerHook('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
Addon::registerHook('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
Addon::registerHook('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates');
Addon::registerHook('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
Hook::register('load_config', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_load_config');
Hook::register('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
Hook::register('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
Hook::register('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
Hook::register('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates');
Hook::register('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
Logger::log("installed openstreetmap");
}
function openstreetmap_uninstall()
{
Addon::unregisterHook('load_config', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_load_config');
Addon::unregisterHook('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
Addon::unregisterHook('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
Addon::unregisterHook('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
Addon::unregisterHook('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates');
Addon::unregisterHook('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
Hook::unregister('load_config', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_load_config');
Hook::unregister('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
Hook::unregister('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
Hook::unregister('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
Hook::unregister('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates');
Hook::unregister('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
Logger::log("removed openstreetmap");
}

View File

@ -9,24 +9,25 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
function pageheader_install() {
Addon::registerHook('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
Addon::registerHook('addon_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
Hook::register('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
Hook::register('addon_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
Hook::register('addon_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
}
function pageheader_uninstall() {
Addon::unregisterHook('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
Addon::unregisterHook('addon_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
Hook::unregister('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
Hook::unregister('addon_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
Hook::unregister('addon_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
// hook moved, uninstall the old one if still there.
Addon::unregisterHook('page_header', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
Hook::unregister('page_header', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
}

View File

@ -30,23 +30,23 @@
* about http/https but beware to put the trailing / at the end of your
* setting.
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Util\Strings;
function piwik_install() {
Addon::registerHook('load_config', 'addon/piwik/piwik.php', 'piwik_load_config');
Addon::registerHook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
Hook::register('load_config', 'addon/piwik/piwik.php', 'piwik_load_config');
Hook::register('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
Logger::log("installed piwik addon");
}
function piwik_uninstall() {
Addon::unregisterHook('load_config', 'addon/piwik/piwik.php', 'piwik_load_config');
Addon::unregisterHook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
Hook::unregister('load_config', 'addon/piwik/piwik.php', 'piwik_load_config');
Hook::unregister('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
Logger::log("uninstalled piwik addon");
}

View File

@ -6,7 +6,7 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
* Author: Tony Baldwin <https://free-haven.org/profile/tony>
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -20,7 +20,7 @@ function planets_install() {
*
*/
Addon::registerHook('post_local', 'addon/planets/planets.php', 'planets_post_hook');
Hook::register('post_local', 'addon/planets/planets.php', 'planets_post_hook');
/**
*
@ -30,8 +30,8 @@ function planets_install() {
*
*/
Addon::registerHook('addon_settings', 'addon/planets/planets.php', 'planets_settings');
Addon::registerHook('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
Hook::register('addon_settings', 'addon/planets/planets.php', 'planets_settings');
Hook::register('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
Logger::log("installed planets");
}
@ -47,9 +47,9 @@ function planets_uninstall() {
*
*/
Addon::unregisterHook('post_local', 'addon/planets/planets.php', 'planets_post_hook');
Addon::unregisterHook('addon_settings', 'addon/planets/planets.php', 'planets_settings');
Addon::unregisterHook('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
Hook::unregister('post_local', 'addon/planets/planets.php', 'planets_post_hook');
Hook::unregister('addon_settings', 'addon/planets/planets.php', 'planets_settings');
Hook::unregister('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
Logger::log("removed planets");

View File

@ -7,20 +7,20 @@
* Hauke Altmann <https://snarl.de/profile/tugelblend>
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
function pledgie_install() {
Addon::registerHook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
Addon::registerHook('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
Hook::register('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
Hook::register('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
Hook::register('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
}
function pledgie_uninstall() {
Addon::unregisterHook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
Addon::unregisterHook('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
Hook::unregister('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
Hook::unregister('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
Hook::unregister('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
}
function pledgie_addon_settings(&$a,&$s) {

View File

@ -10,6 +10,7 @@ use Friendica\App;
use Friendica\BaseModule;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
@ -19,20 +20,20 @@ use Friendica\Util\Strings;
function public_server_install()
{
Addon::registerHook('load_config', 'addon/public_server/public_server.php', 'public_server_load_config');
Addon::registerHook('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
Addon::registerHook('cron', 'addon/public_server/public_server.php', 'public_server_cron');
Addon::registerHook('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
Addon::registerHook('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
Hook::register('load_config', 'addon/public_server/public_server.php', 'public_server_load_config');
Hook::register('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
Hook::register('cron', 'addon/public_server/public_server.php', 'public_server_cron');
Hook::register('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
Hook::register('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
}
function public_server_uninstall()
{
Addon::unregisterHook('load_config', 'addon/public_server/public_server.php', 'public_server_load_config');
Addon::unregisterHook('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
Addon::unregisterHook('cron', 'addon/public_server/public_server.php', 'public_server_cron');
Addon::unregisterHook('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
Addon::unregisterHook('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
Hook::unregister('load_config', 'addon/public_server/public_server.php', 'public_server_load_config');
Hook::unregister('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
Hook::unregister('cron', 'addon/public_server/public_server.php', 'public_server_cron');
Hook::unregister('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
Hook::unregister('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
}
function public_server_load_config(App $a)

View File

@ -9,8 +9,8 @@
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -37,30 +37,30 @@ define('PUMPIO_DEFAULT_POLL_INTERVAL', 5); // given in minutes
function pumpio_install()
{
Addon::registerHook('load_config', 'addon/pumpio/pumpio.php', 'pumpio_load_config');
Addon::registerHook('hook_fork', 'addon/pumpio/pumpio.php', 'hook_fork');
Addon::registerHook('post_local', 'addon/pumpio/pumpio.php', 'pumpio_post_local');
Addon::registerHook('notifier_normal', 'addon/pumpio/pumpio.php', 'pumpio_send');
Addon::registerHook('jot_networks', 'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
Addon::registerHook('connector_settings', 'addon/pumpio/pumpio.php', 'pumpio_settings');
Addon::registerHook('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
Addon::registerHook('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
Addon::registerHook('queue_predeliver', 'addon/pumpio/pumpio.php', 'pumpio_queue_hook');
Addon::registerHook('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
Hook::register('load_config', 'addon/pumpio/pumpio.php', 'pumpio_load_config');
Hook::register('hook_fork', 'addon/pumpio/pumpio.php', 'hook_fork');
Hook::register('post_local', 'addon/pumpio/pumpio.php', 'pumpio_post_local');
Hook::register('notifier_normal', 'addon/pumpio/pumpio.php', 'pumpio_send');
Hook::register('jot_networks', 'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
Hook::register('connector_settings', 'addon/pumpio/pumpio.php', 'pumpio_settings');
Hook::register('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
Hook::register('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
Hook::register('queue_predeliver', 'addon/pumpio/pumpio.php', 'pumpio_queue_hook');
Hook::register('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
}
function pumpio_uninstall()
{
Addon::unregisterHook('load_config', 'addon/pumpio/pumpio.php', 'pumpio_load_config');
Addon::unregisterHook('hook_fork', 'addon/pumpio/pumpio.php', 'pumpio_hook_fork');
Addon::unregisterHook('post_local', 'addon/pumpio/pumpio.php', 'pumpio_post_local');
Addon::unregisterHook('notifier_normal', 'addon/pumpio/pumpio.php', 'pumpio_send');
Addon::unregisterHook('jot_networks', 'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/pumpio/pumpio.php', 'pumpio_settings');
Addon::unregisterHook('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
Addon::unregisterHook('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
Addon::unregisterHook('queue_predeliver', 'addon/pumpio/pumpio.php', 'pumpio_queue_hook');
Addon::unregisterHook('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
Hook::unregister('load_config', 'addon/pumpio/pumpio.php', 'pumpio_load_config');
Hook::unregister('hook_fork', 'addon/pumpio/pumpio.php', 'pumpio_hook_fork');
Hook::unregister('post_local', 'addon/pumpio/pumpio.php', 'pumpio_post_local');
Hook::unregister('notifier_normal', 'addon/pumpio/pumpio.php', 'pumpio_send');
Hook::unregister('jot_networks', 'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
Hook::unregister('connector_settings', 'addon/pumpio/pumpio.php', 'pumpio_settings');
Hook::unregister('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
Hook::unregister('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
Hook::unregister('queue_predeliver', 'addon/pumpio/pumpio.php', 'pumpio_queue_hook');
Hook::unregister('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
}
function pumpio_module() {}

View File

@ -17,20 +17,20 @@
* them to open the comment window fully and insert the qcomment. Then "Submit" will submit it.
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Util\XML;
function qcomment_install() {
Addon::registerHook('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
Hook::register('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
Hook::register('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
}
function qcomment_uninstall() {
Addon::unregisterHook('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
Hook::unregister('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
Hook::unregister('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
}

View File

@ -18,7 +18,7 @@
* system will call the name_uninstall() function.
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -32,7 +32,7 @@ function randplace_install() {
*
*/
Addon::registerHook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
Hook::register('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
/**
*
@ -42,8 +42,8 @@ function randplace_install() {
*
*/
Addon::registerHook('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings');
Addon::registerHook('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
Hook::register('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings');
Hook::register('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
Logger::log("installed randplace");
}
@ -59,9 +59,9 @@ function randplace_uninstall() {
*
*/
Addon::unregisterHook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
Addon::unregisterHook('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings');
Addon::unregisterHook('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
Hook::unregister('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
Hook::unregister('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings');
Hook::unregister('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
Logger::log("removed randplace");

View File

@ -7,8 +7,8 @@
* Status: Unsupported
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
@ -16,15 +16,15 @@ use Friendica\Database\DBA;
use Friendica\Util\Strings;
function remote_permissions_install() {
Addon::registerHook('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
Addon::registerHook('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
Addon::registerHook('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
Hook::register('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
Hook::register('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
Hook::register('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
}
function remote_permissions_uninstall() {
Addon::unregisterHook('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
Addon::unregisterHook('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
Addon::unregisterHook('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
Hook::unregister('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
Hook::unregister('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
Hook::unregister('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
}
function remote_permissions_settings(&$a,&$o) {

View File

@ -6,18 +6,18 @@
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
function rendertime_install() {
Addon::registerHook('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
Hook::register('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
}
function rendertime_uninstall() {
Addon::unregisterHook('init_1', 'addon/rendertime/rendertime.php', 'rendertime_init_1');
Addon::unregisterHook('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
Hook::unregister('init_1', 'addon/rendertime/rendertime.php', 'rendertime_init_1');
Hook::unregister('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
}
function rendertime_init_1(&$a) {

View File

@ -7,8 +7,8 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -28,19 +28,19 @@ require_once 'openpgp_crypt_symmetric.php';
function securemail_install() {
Addon::registerHook('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
Addon::registerHook('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
Hook::register('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
Hook::register('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
Addon::registerHook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
Hook::register('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
Logger::log('installed securemail');
}
function securemail_uninstall() {
Addon::unregisterHook('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
Addon::unregisterHook('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
Hook::unregister('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
Hook::unregister('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
Addon::unregisterHook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
Hook::unregister('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
Logger::log('removed securemail');
}

View File

@ -7,23 +7,23 @@
* based upon NSFW from Mike Macgirvin <http://macgirvin.com/profile/mike>
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Util\Strings;
function showmore_install()
{
Addon::registerHook('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
Addon::registerHook('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
Hook::register('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
Hook::register('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
Hook::register('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
}
function showmore_uninstall()
{
Addon::unregisterHook('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
Addon::unregisterHook('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
Hook::unregister('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
Hook::unregister('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
Hook::unregister('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
}
function showmore_addon_settings(&$a, &$s)

View File

@ -6,14 +6,14 @@
* Author: Thomas Willingham (based on Mike Macgirvin's Adult Smile template)
* All smileys from sites offering them as Public Domain
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
function smiley_pack_es_install() {
Addon::registerHook('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies_es');
Hook::register('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies_es');
}
function smiley_pack_es_uninstall() {
Addon::unregisterHook('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies');
Hook::unregister('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies');
}

View File

@ -8,14 +8,14 @@
*
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
function smiley_pack_fr_install() {
Addon::registerHook('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
Hook::register('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
}
function smiley_pack_fr_uninstall() {
Addon::unregisterHook('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
Hook::unregister('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
}

View File

@ -7,14 +7,14 @@
* All smileys from sites offering them as Public Domain
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
function smiley_pack_install() {
Addon::registerHook('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
Hook::register('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
}
function smiley_pack_uninstall() {
Addon::unregisterHook('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
Hook::unregister('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
}

View File

@ -5,13 +5,12 @@
* Version: 0.2
* Author: Johannes Schwab <https://friendica.jschwab.org/profile/ddorian>
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
function smileybutton_install() {
//Register hooks
Addon::registerHook('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button');
Hook::register('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button');
Logger::log("installed smileybutton");
}
@ -19,7 +18,7 @@ function smileybutton_install() {
function smileybutton_uninstall() {
//Delet registered hooks
Addon::unregisterHook('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button');
Hook::unregister('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button');
Logger::log("removed smileybutton");
}

View File

@ -8,14 +8,14 @@
* This is a template for how to extend the "smily" code.
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
function smilies_adult_install() {
Addon::registerHook('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
Hook::register('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
}
function smilies_adult_uninstall() {
Addon::unregisterHook('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
Hook::unregister('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
}

View File

@ -9,14 +9,14 @@
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
function sniper_install() {
Addon::registerHook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
Hook::register('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
}
function sniper_uninstall() {
Addon::unregisterHook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
Hook::unregister('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
}

View File

@ -6,21 +6,21 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function startpage_install() {
Addon::registerHook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
Addon::registerHook('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings');
Addon::registerHook('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
Hook::register('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
Hook::register('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings');
Hook::register('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
}
function startpage_uninstall()
{
Addon::unregisterHook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
Addon::unregisterHook('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings');
Addon::unregisterHook('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
Hook::unregister('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
Hook::unregister('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings');
Hook::unregister('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
}
function startpage_home_init($a, $b)

View File

@ -43,8 +43,8 @@ use Friendica\App;
use Friendica\Content\OEmbed;
use Friendica\Content\Text\HTML;
use Friendica\Content\Text\Plaintext;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -65,34 +65,34 @@ use Friendica\Util\Strings;
function statusnet_install()
{
// we need some hooks, for the configuration and for sending tweets
Addon::registerHook('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
Addon::registerHook('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
Addon::registerHook('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
Addon::registerHook('hook_fork', 'addon/statusnet/statusnet.php', 'statusnet_hook_fork');
Addon::registerHook('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
Addon::registerHook('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
Addon::registerHook('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
Addon::registerHook('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
Addon::registerHook('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
Hook::register('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
Hook::register('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
Hook::register('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
Hook::register('hook_fork', 'addon/statusnet/statusnet.php', 'statusnet_hook_fork');
Hook::register('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
Hook::register('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
Hook::register('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
Hook::register('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
Hook::register('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
Logger::log("installed GNU Social");
}
function statusnet_uninstall()
{
Addon::unregisterHook('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
Addon::unregisterHook('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
Addon::unregisterHook('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
Addon::unregisterHook('hook_fork', 'addon/statusnet/statusnet.php', 'statusnet_hook_fork');
Addon::unregisterHook('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
Addon::unregisterHook('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
Addon::unregisterHook('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
Addon::unregisterHook('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
Addon::unregisterHook('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
Hook::unregister('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
Hook::unregister('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
Hook::unregister('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
Hook::unregister('hook_fork', 'addon/statusnet/statusnet.php', 'statusnet_hook_fork');
Hook::unregister('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
Hook::unregister('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
Hook::unregister('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
Hook::unregister('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
Hook::unregister('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
// old setting - remove only
Addon::unregisterHook('post_local_end', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
Addon::unregisterHook('addon_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
Addon::unregisterHook('addon_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
Hook::unregister('post_local_end', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
Hook::unregister('addon_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
Hook::unregister('addon_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
}
function statusnet_check_item_notification(App $a, &$notification_data)

View File

@ -6,27 +6,27 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Util\Strings;
function superblock_install()
{
Addon::registerHook('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
Addon::registerHook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
Addon::registerHook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
Addon::registerHook('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
Hook::register('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
Hook::register('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
Hook::register('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
Hook::register('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
Hook::register('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
}
function superblock_uninstall()
{
Addon::unregisterHook('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
Addon::unregisterHook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
Addon::unregisterHook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
Addon::unregisterHook('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
Hook::unregister('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
Hook::unregister('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
Hook::unregister('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
Hook::unregister('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
Hook::unregister('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
}
function superblock_addon_settings(&$a, &$s)

View File

@ -7,8 +7,8 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Database\DBA;
use Friendica\Model\User;
@ -16,22 +16,22 @@ use Friendica\Util\DateTimeFormat;
function testdrive_install() {
Addon::registerHook('load_config', 'addon/testdrive/testdrive.php', 'testdrive_load_config');
Addon::registerHook('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
Addon::registerHook('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
Addon::registerHook('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
Addon::registerHook('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
Hook::register('load_config', 'addon/testdrive/testdrive.php', 'testdrive_load_config');
Hook::register('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
Hook::register('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
Hook::register('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
Hook::register('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
}
function testdrive_uninstall() {
Addon::unregisterHook('load_config', 'addon/testdrive/testdrive.php', 'testdrive_load_config');
Addon::unregisterHook('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
Addon::unregisterHook('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
Addon::unregisterHook('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
Addon::unregisterHook('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
Hook::unregister('load_config', 'addon/testdrive/testdrive.php', 'testdrive_load_config');
Hook::unregister('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
Hook::unregister('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
Hook::unregister('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
Hook::unregister('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
}

View File

@ -6,14 +6,15 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
function tictac_install() {
Addon::registerHook('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
Hook::register('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
}
function tictac_uninstall() {
Addon::unregisterHook('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
Hook::unregister('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
}

View File

@ -11,8 +11,8 @@ require_once __DIR__ . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . '
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -22,22 +22,22 @@ use Friendica\Util\Strings;
function tumblr_install()
{
Addon::registerHook('hook_fork', 'addon/tumblr/tumblr.php', 'tumblr_hook_fork');
Addon::registerHook('post_local', 'addon/tumblr/tumblr.php', 'tumblr_post_local');
Addon::registerHook('notifier_normal', 'addon/tumblr/tumblr.php', 'tumblr_send');
Addon::registerHook('jot_networks', 'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
Addon::registerHook('connector_settings', 'addon/tumblr/tumblr.php', 'tumblr_settings');
Addon::registerHook('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
Hook::register('hook_fork', 'addon/tumblr/tumblr.php', 'tumblr_hook_fork');
Hook::register('post_local', 'addon/tumblr/tumblr.php', 'tumblr_post_local');
Hook::register('notifier_normal', 'addon/tumblr/tumblr.php', 'tumblr_send');
Hook::register('jot_networks', 'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
Hook::register('connector_settings', 'addon/tumblr/tumblr.php', 'tumblr_settings');
Hook::register('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
}
function tumblr_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/tumblr/tumblr.php', 'tumblr_hook_fork');
Addon::unregisterHook('post_local', 'addon/tumblr/tumblr.php', 'tumblr_post_local');
Addon::unregisterHook('notifier_normal', 'addon/tumblr/tumblr.php', 'tumblr_send');
Addon::unregisterHook('jot_networks', 'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/tumblr/tumblr.php', 'tumblr_settings');
Addon::unregisterHook('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
Hook::unregister('hook_fork', 'addon/tumblr/tumblr.php', 'tumblr_hook_fork');
Hook::unregister('post_local', 'addon/tumblr/tumblr.php', 'tumblr_post_local');
Hook::unregister('notifier_normal', 'addon/tumblr/tumblr.php', 'tumblr_send');
Hook::unregister('jot_networks', 'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
Hook::unregister('connector_settings', 'addon/tumblr/tumblr.php', 'tumblr_settings');
Hook::unregister('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
}
function tumblr_module()

View File

@ -68,8 +68,8 @@ use Friendica\App;
use Friendica\Content\OEmbed;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\Plaintext;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -102,42 +102,42 @@ define('TWITTER_DEFAULT_POLL_INTERVAL', 5); // given in minutes
function twitter_install()
{
// we need some hooks, for the configuration and for sending tweets
Addon::registerHook('load_config' , __FILE__, 'twitter_load_config');
Addon::registerHook('connector_settings' , __FILE__, 'twitter_settings');
Addon::registerHook('connector_settings_post', __FILE__, 'twitter_settings_post');
Addon::registerHook('hook_fork' , __FILE__, 'twitter_hook_fork');
Addon::registerHook('post_local' , __FILE__, 'twitter_post_local');
Addon::registerHook('notifier_normal' , __FILE__, 'twitter_post_hook');
Addon::registerHook('jot_networks' , __FILE__, 'twitter_jot_nets');
Addon::registerHook('cron' , __FILE__, 'twitter_cron');
Addon::registerHook('queue_predeliver' , __FILE__, 'twitter_queue_hook');
Addon::registerHook('follow' , __FILE__, 'twitter_follow');
Addon::registerHook('expire' , __FILE__, 'twitter_expire');
Addon::registerHook('prepare_body' , __FILE__, 'twitter_prepare_body');
Addon::registerHook('check_item_notification', __FILE__, 'twitter_check_item_notification');
Hook::register('load_config' , __FILE__, 'twitter_load_config');
Hook::register('connector_settings' , __FILE__, 'twitter_settings');
Hook::register('connector_settings_post', __FILE__, 'twitter_settings_post');
Hook::register('hook_fork' , __FILE__, 'twitter_hook_fork');
Hook::register('post_local' , __FILE__, 'twitter_post_local');
Hook::register('notifier_normal' , __FILE__, 'twitter_post_hook');
Hook::register('jot_networks' , __FILE__, 'twitter_jot_nets');
Hook::register('cron' , __FILE__, 'twitter_cron');
Hook::register('queue_predeliver' , __FILE__, 'twitter_queue_hook');
Hook::register('follow' , __FILE__, 'twitter_follow');
Hook::register('expire' , __FILE__, 'twitter_expire');
Hook::register('prepare_body' , __FILE__, 'twitter_prepare_body');
Hook::register('check_item_notification', __FILE__, 'twitter_check_item_notification');
Logger::log("installed twitter");
}
function twitter_uninstall()
{
Addon::unregisterHook('load_config' , __FILE__, 'twitter_load_config');
Addon::unregisterHook('connector_settings' , __FILE__, 'twitter_settings');
Addon::unregisterHook('connector_settings_post', __FILE__, 'twitter_settings_post');
Addon::unregisterHook('hook_fork' , __FILE__, 'twitter_hook_fork');
Addon::unregisterHook('post_local' , __FILE__, 'twitter_post_local');
Addon::unregisterHook('notifier_normal' , __FILE__, 'twitter_post_hook');
Addon::unregisterHook('jot_networks' , __FILE__, 'twitter_jot_nets');
Addon::unregisterHook('cron' , __FILE__, 'twitter_cron');
Addon::unregisterHook('queue_predeliver' , __FILE__, 'twitter_queue_hook');
Addon::unregisterHook('follow' , __FILE__, 'twitter_follow');
Addon::unregisterHook('expire' , __FILE__, 'twitter_expire');
Addon::unregisterHook('prepare_body' , __FILE__, 'twitter_prepare_body');
Addon::unregisterHook('check_item_notification', __FILE__, 'twitter_check_item_notification');
Hook::unregister('load_config' , __FILE__, 'twitter_load_config');
Hook::unregister('connector_settings' , __FILE__, 'twitter_settings');
Hook::unregister('connector_settings_post', __FILE__, 'twitter_settings_post');
Hook::unregister('hook_fork' , __FILE__, 'twitter_hook_fork');
Hook::unregister('post_local' , __FILE__, 'twitter_post_local');
Hook::unregister('notifier_normal' , __FILE__, 'twitter_post_hook');
Hook::unregister('jot_networks' , __FILE__, 'twitter_jot_nets');
Hook::unregister('cron' , __FILE__, 'twitter_cron');
Hook::unregister('queue_predeliver' , __FILE__, 'twitter_queue_hook');
Hook::unregister('follow' , __FILE__, 'twitter_follow');
Hook::unregister('expire' , __FILE__, 'twitter_expire');
Hook::unregister('prepare_body' , __FILE__, 'twitter_prepare_body');
Hook::unregister('check_item_notification', __FILE__, 'twitter_check_item_notification');
// old setting - remove only
Addon::unregisterHook('post_local_end' , __FILE__, 'twitter_post_hook');
Addon::unregisterHook('addon_settings' , __FILE__, 'twitter_settings');
Addon::unregisterHook('addon_settings_post', __FILE__, 'twitter_settings_post');
Hook::unregister('post_local_end' , __FILE__, 'twitter_post_hook');
Hook::unregister('addon_settings' , __FILE__, 'twitter_settings');
Hook::unregister('addon_settings_post', __FILE__, 'twitter_settings_post');
}
function twitter_load_config(App $a)

View File

@ -5,15 +5,15 @@
* Version: 1.0
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
*/
use Friendica\Core\Addon;
use Friendica\Content\Smilies;
use Friendica\Core\Hook;
function unicode_smilies_install() {
Addon::registerHook('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
Hook::register('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
}
function unicode_smilies_uninstall() {
Addon::unregisterHook('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
Hook::unregister('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
}
function unicode_smilies_smilies(&$a,&$b) {

View File

@ -6,20 +6,20 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Model\Item;
use Friendica\Database\DBA;
function viewsrc_install() {
Addon::registerHook('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
Addon::registerHook('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
Hook::register('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
Hook::register('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
}
function viewsrc_uninstall() {
Addon::unregisterHook('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
Addon::unregisterHook('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
Hook::unregister('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
Hook::unregister('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
}

View File

@ -6,18 +6,18 @@
* Author: Stephen Mahood <https://friends.mayfirst.org/profile/marxistvegan>
* Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Util\Strings;
function webrtc_install() {
Addon::registerHook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
Hook::register('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
}
function webrtc_uninstall() {
Addon::unregisterHook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
Hook::unregister('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
}

View File

@ -7,7 +7,7 @@
* Status: Unsupported
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -15,14 +15,14 @@ use Friendica\Core\Renderer;
use Friendica\Database\DBA;
function widgets_install() {
Addon::registerHook('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
Addon::registerHook('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
Hook::register('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
Hook::register('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
Logger::log("installed widgets");
}
function widgets_uninstall() {
Addon::unregisterHook('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
Addon::unregisterHook('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
Hook::unregister('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
Hook::unregister('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
}
function widgets_settings_post(){

View File

@ -29,7 +29,6 @@
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
use Friendica\Core\Addon;
use Friendica\Core\Authentication;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
@ -45,15 +44,15 @@ function windowsphonepush_install()
* The first is within cron - so the push notifications will be
* sent every 10 minutes (or whatever is set in crontab).
*/
Addon::registerHook('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
Hook::register('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
/* Then we'll attach into the addon settings page, and also the
* settings post hook so that we can create and update
* user preferences. User shall be able to activate the addon and
* define whether he allows pushing first characters of item text
*/
Addon::registerHook('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
Addon::registerHook('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
Hook::register('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
Hook::register('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
Logger::log("installed windowsphonepush");
}
@ -63,9 +62,9 @@ function windowsphonepush_uninstall()
/* uninstall unregisters any hooks created with register_hook
* during install. Don't delete data in table `pconfig`.
*/
Addon::unregisterHook('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
Addon::unregisterHook('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
Addon::unregisterHook('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
Hook::unregister('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
Hook::unregister('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
Hook::unregister('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
Logger::log("removed windowsphonepush");
}

View File

@ -6,10 +6,9 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -20,27 +19,27 @@ use Friendica\Util\XML;
function wppost_install()
{
Addon::registerHook('hook_fork', 'addon/wppost/wppost.php', 'wppost_hook_fork');
Addon::registerHook('post_local', 'addon/wppost/wppost.php', 'wppost_post_local');
Addon::registerHook('notifier_normal', 'addon/wppost/wppost.php', 'wppost_send');
Addon::registerHook('jot_networks', 'addon/wppost/wppost.php', 'wppost_jot_nets');
Addon::registerHook('connector_settings', 'addon/wppost/wppost.php', 'wppost_settings');
Addon::registerHook('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
Hook::register('hook_fork', 'addon/wppost/wppost.php', 'wppost_hook_fork');
Hook::register('post_local', 'addon/wppost/wppost.php', 'wppost_post_local');
Hook::register('notifier_normal', 'addon/wppost/wppost.php', 'wppost_send');
Hook::register('jot_networks', 'addon/wppost/wppost.php', 'wppost_jot_nets');
Hook::register('connector_settings', 'addon/wppost/wppost.php', 'wppost_settings');
Hook::register('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
}
function wppost_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/wppost/wppost.php', 'wppost_hook_fork');
Addon::unregisterHook('post_local', 'addon/wppost/wppost.php', 'wppost_post_local');
Addon::unregisterHook('notifier_normal', 'addon/wppost/wppost.php', 'wppost_send');
Addon::unregisterHook('jot_networks', 'addon/wppost/wppost.php', 'wppost_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/wppost/wppost.php', 'wppost_settings');
Addon::unregisterHook('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
Hook::unregister('hook_fork', 'addon/wppost/wppost.php', 'wppost_hook_fork');
Hook::unregister('post_local', 'addon/wppost/wppost.php', 'wppost_post_local');
Hook::unregister('notifier_normal', 'addon/wppost/wppost.php', 'wppost_send');
Hook::unregister('jot_networks', 'addon/wppost/wppost.php', 'wppost_jot_nets');
Hook::unregister('connector_settings', 'addon/wppost/wppost.php', 'wppost_settings');
Hook::unregister('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
// obsolete - remove
Addon::unregisterHook('post_local_end', 'addon/wppost/wppost.php', 'wppost_send');
Addon::unregisterHook('addon_settings', 'addon/wppost/wppost.php', 'wppost_settings');
Addon::unregisterHook('addon_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
Hook::unregister('post_local_end', 'addon/wppost/wppost.php', 'wppost_send');
Hook::unregister('addon_settings', 'addon/wppost/wppost.php', 'wppost_settings');
Hook::unregister('addon_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
}

View File

@ -7,8 +7,8 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
@ -16,18 +16,18 @@ use Friendica\Util\Strings;
function xmpp_install()
{
Addon::registerHook('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post');
Addon::registerHook('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
Addon::registerHook('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
Hook::register('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings');
Hook::register('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post');
Hook::register('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
Hook::register('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
}
function xmpp_uninstall()
{
Addon::unregisterHook('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post');
Addon::unregisterHook('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
Addon::unregisterHook('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
Hook::unregister('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings');
Hook::unregister('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post');
Hook::unregister('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
Hook::unregister('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
}
function xmpp_addon_settings_post()