X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=blockem%2Fblockem.php;h=5dd7f4ec947c690b283b3d783742c8adc99a6d9b;hb=f8c162cbfb777793891f885e019eb8eae319dce1;hp=2a2cd3d265b1a47d373fa09bef617ede73077701;hpb=0afd633346b517894ff8e92c705bd5d052dd06a2;p=friendica-addons.git
diff --git a/blockem/blockem.php b/blockem/blockem.php
index 2a2cd3d2..5dd7f4ec 100644
--- a/blockem/blockem.php
+++ b/blockem/blockem.php
@@ -7,35 +7,33 @@
*
*/
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
-function blockem_install() {
+function blockem_install()
+{
Addon::registerHook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
Addon::registerHook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
- Addon::registerHook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
- Addon::registerHook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
+ Addon::registerHook('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' );
+ Addon::registerHook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store');
}
-
-function blockem_uninstall() {
+function blockem_uninstall()
+{
Addon::unregisterHook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
Addon::unregisterHook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
- Addon::unregisterHook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
- Addon::unregisterHook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
+ Addon::unregisterHook('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' );
-
+ Addon::unregisterHook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store');
}
-
-
-
-
-function blockem_addon_settings(&$a,&$s) {
+function blockem_addon_settings(&$a, &$s)
+{
if(! local_user())
return;
@@ -45,24 +43,24 @@ function blockem_addon_settings(&$a,&$s) {
$a->page['htmlhead'] .= '' . "\r\n";
- $words = PConfig::get(local_user(),'blockem','words');
+ $words = PConfig::get(local_user(), 'blockem', 'words');
if(! $words)
$words = '';
$s .= '';
- $s .= '' . t('"Blockem"') . '
';
+ $s .= '' . L10n::t('"Blockem"') . '
';
$s .= '';
$s .= '