Replace deprecated Addon::*registerHook by Hook::*register
This commit is contained in:
parent
eaeb834819
commit
c27b1cb66f
82 changed files with 625 additions and 630 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue