-function wppost_install() {
- register_hook('post_local', 'addon/wppost/wppost.php', 'wppost_post_local');
- register_hook('notifier_normal', 'addon/wppost/wppost.php', 'wppost_send');
- register_hook('jot_networks', 'addon/wppost/wppost.php', 'wppost_jot_nets');
- register_hook('connector_settings', 'addon/wppost/wppost.php', 'wppost_settings');
- register_hook('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
-
-}
-function wppost_uninstall() {
- unregister_hook('post_local', 'addon/wppost/wppost.php', 'wppost_post_local');
- unregister_hook('notifier_normal', 'addon/wppost/wppost.php', 'wppost_send');
- unregister_hook('jot_networks', 'addon/wppost/wppost.php', 'wppost_jot_nets');
- unregister_hook('connector_settings', 'addon/wppost/wppost.php', 'wppost_settings');
- unregister_hook('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
-
- // obsolete - remove
- unregister_hook('post_local_end', 'addon/wppost/wppost.php', 'wppost_send');
- unregister_hook('plugin_settings', 'addon/wppost/wppost.php', 'wppost_settings');
- unregister_hook('plugin_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
-
+use Friendica\Content\Text\BBCode;
+use Friendica\Content\Text\HTML;
+use Friendica\Core\Hook;
+use Friendica\Core\Logger;
+use Friendica\Database\DBA;
+use Friendica\DI;
+use Friendica\Util\Strings;
+use Friendica\Util\XML;
+
+function wppost_install()
+{
+ 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');