-use Friendica\Core\Addon;
-use Friendica\Core\L10n;
-use Friendica\Core\PConfig;
-use Friendica\Util\Network;
-
-function wppost_install() {
- Addon::registerHook('post_local', 'addon/wppost/wppost.php', 'wppost_post_local');
- Addon::registerHook('notifier_normal', 'addon/wppost/wppost.php', 'wppost_send');
- Addon::registerHook('jot_networks', 'addon/wppost/wppost.php', 'wppost_jot_nets');
- Addon::registerHook('connector_settings', 'addon/wppost/wppost.php', 'wppost_settings');
- Addon::registerHook('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
-
-}
-function wppost_uninstall() {
- Addon::unregisterHook('post_local', 'addon/wppost/wppost.php', 'wppost_post_local');
- Addon::unregisterHook('notifier_normal', 'addon/wppost/wppost.php', 'wppost_send');
- Addon::unregisterHook('jot_networks', 'addon/wppost/wppost.php', 'wppost_jot_nets');
- Addon::unregisterHook('connector_settings', 'addon/wppost/wppost.php', 'wppost_settings');
- Addon::unregisterHook('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
-
- // obsolete - remove
- Addon::unregisterHook('post_local_end', 'addon/wppost/wppost.php', 'wppost_send');
- Addon::unregisterHook('addon_settings', 'addon/wppost/wppost.php', 'wppost_settings');
- Addon::unregisterHook('addon_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
-
+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');