X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=blockem%2Fblockem.php;h=3a32aa2d4f8831470bd3186ba65a97c82589b303;hb=86b2d830a5da62f90c22b5d3f15921a60de25f37;hp=8263fb109a7c2794356bd1ea8acf0ef746382b1e;hpb=347e4eff142dacd7088d8fcda45434eb3a8b1696;p=friendica-addons.git
diff --git a/blockem/blockem.php b/blockem/blockem.php
index 8263fb10..3a32aa2d 100644
--- a/blockem/blockem.php
+++ b/blockem/blockem.php
@@ -8,31 +8,31 @@
*/
use Friendica\App;
-use Friendica\Core\Addon;
-use Friendica\Core\L10n;
-use Friendica\Core\PConfig;
+use Friendica\Core\Hook;
+use Friendica\DI;
+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)
@@ -42,29 +42,29 @@ function blockem_addon_settings (App $a, &$s)
}
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '' . "\r\n";
+ DI::page()['htmlhead'] .= '' . "\r\n";
- $words = PConfig::get(local_user(), 'blockem', 'words');
+ $words = DI::pConfig()->get(local_user(), 'blockem', 'words');
if (!$words) {
$words = '';
}
$s .= '';
- $s .= '' . L10n::t('"Blockem"') . '
';
+ $s .= '' . DI::l10n()->t('Blockem') . '
';
$s .= '';
$s .= '