X-Git-Url: https://git.mxchange.org/?p=friendica-addons.git;a=blobdiff_plain;f=smileybutton%2Fsmileybutton.php;fp=smileybutton%2Fsmileybutton.php;h=7c5e84f92e816215e5f6b564587a9494f6c36502;hp=d8c1533024704673b0ce5534d9d475e427912b4b;hb=39dd3dffe07efd69fa1ac6d0bd243c7fc0e3a66f;hpb=5360f08f4295f2306d815a7659fbdff94fda01a3 diff --git a/smileybutton/smileybutton.php b/smileybutton/smileybutton.php index d8c15330..7c5e84f9 100644 --- a/smileybutton/smileybutton.php +++ b/smileybutton/smileybutton.php @@ -5,19 +5,19 @@ * Version: 0.2 * Author: Johannes Schwab */ - +use Friendica\Core\Addon; function smileybutton_install() { - //Register hooks - register_hook('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button'); - + //Register hooks + Addon::registerHook('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button'); + logger("installed smileybutton"); } function smileybutton_uninstall() { //Delet registered hooks - unregister_hook('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button'); + Addon::unregisterHook('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button'); logger("removed smileybutton"); } @@ -95,8 +95,8 @@ function show_button($a, &$b) { ); // Call hooks to get aditional smileies from other addons - $params = array('texts' => $texts, 'icons' => $icons, 'string' => ""); //changed - call_hooks('smilie', $params); + $params = ['texts' => $texts, 'icons' => $icons, 'string' => ""]; //changed + Addon::callHooks('smilie', $params); //Generate html for smiley list $s = "\n\t";