### index.php
- Addon::callHooks('init_1');
- Addon::callHooks('app_menu', $arr);
- Addon::callHooks('page_content_top', $a->page['content']);
- Addon::callHooks($a->module.'_mod_init', $placeholder);
- Addon::callHooks($a->module.'_mod_init', $placeholder);
- Addon::callHooks($a->module.'_mod_post', $_POST);
- Addon::callHooks($a->module.'_mod_afterpost', $placeholder);
- Addon::callHooks($a->module.'_mod_content', $arr);
- Addon::callHooks($a->module.'_mod_aftercontent', $arr);
- Addon::callHooks('page_end', $a->page['content']);
+ Hook::callAll('init_1');
+ Hook::callAll('app_menu', $arr);
+ Hook::callAll('page_content_top', $a->page['content']);
+ Hook::callAll($a->module.'_mod_init', $placeholder);
+ Hook::callAll($a->module.'_mod_init', $placeholder);
+ Hook::callAll($a->module.'_mod_post', $_POST);
+ Hook::callAll($a->module.'_mod_afterpost', $placeholder);
+ Hook::callAll($a->module.'_mod_content', $arr);
+ Hook::callAll($a->module.'_mod_aftercontent', $arr);
+ Hook::callAll('page_end', $a->page['content']);
### include/api.php
- Addon::callHooks('logged_in', $a->user);
- Addon::callHooks('authenticate', $addon_auth);
- Addon::callHooks('logged_in', $a->user);
+ Hook::callAll('logged_in', $a->user);
+ Hook::callAll('authenticate', $addon_auth);
+ Hook::callAll('logged_in', $a->user);
### include/enotify.php
- Addon::callHooks('enotify', $h);
- Addon::callHooks('enotify_store', $datarray);
- Addon::callHooks('enotify_mail', $datarray);
- Addon::callHooks('check_item_notification', $notification_data);
+ Hook::callAll('enotify', $h);
+ Hook::callAll('enotify_store', $datarray);
+ Hook::callAll('enotify_mail', $datarray);
+ Hook::callAll('check_item_notification', $notification_data);
### include/conversation.php
- Addon::callHooks('conversation_start', $cb);
- Addon::callHooks('render_location', $locate);
- Addon::callHooks('display_item', $arr);
- Addon::callHooks('display_item', $arr);
- Addon::callHooks('item_photo_menu', $args);
- Addon::callHooks('jot_tool', $jotplugins);
+ Hook::callAll('conversation_start', $cb);
+ Hook::callAll('render_location', $locate);
+ Hook::callAll('display_item', $arr);
+ Hook::callAll('display_item', $arr);
+ Hook::callAll('item_photo_menu', $args);
+ Hook::callAll('jot_tool', $jotplugins);
### include/text.php
- Addon::callHooks('contact_block_end', $arr);
- Addon::callHooks('poke_verbs', $arr);
- Addon::callHooks('put_item_in_cache', $hook_data);
- Addon::callHooks('prepare_body_init', $item);
- Addon::callHooks('prepare_body_content_filter', $hook_data);
- Addon::callHooks('prepare_body', $hook_data);
- Addon::callHooks('prepare_body_final', $hook_data);
+ Hook::callAll('contact_block_end', $arr);
+ Hook::callAll('poke_verbs', $arr);
+ Hook::callAll('put_item_in_cache', $hook_data);
+ Hook::callAll('prepare_body_init', $item);
+ Hook::callAll('prepare_body_content_filter', $hook_data);
+ Hook::callAll('prepare_body', $hook_data);
+ Hook::callAll('prepare_body_final', $hook_data);
### include/items.php
- Addon::callHooks('page_info_data', $data);
+ Hook::callAll('page_info_data', $data);
### mod/directory.php
- Addon::callHooks('directory_item', $arr);
+ Hook::callAll('directory_item', $arr);
### mod/xrd.php
- Addon::callHooks('personal_xrd', $arr);
+ Hook::callAll('personal_xrd', $arr);
### mod/ping.php
- Addon::callHooks('network_ping', $arr);
+ Hook::callAll('network_ping', $arr);
### mod/parse_url.php
- Addon::callHooks("parse_link", $arr);
+ Hook::callAll("parse_link", $arr);
### mod/manage.php
- Addon::callHooks('home_init', $ret);
+ Hook::callAll('home_init', $ret);
### mod/acl.php
- Addon::callHooks('acl_lookup_end', $results);
+ Hook::callAll('acl_lookup_end', $results);
### mod/network.php
- Addon::callHooks('network_content_init', $arr);
- Addon::callHooks('network_tabs', $arr);
+ Hook::callAll('network_content_init', $arr);
+ Hook::callAll('network_tabs', $arr);
### mod/friendica.php
- Addon::callHooks('about_hook', $o);
+ Hook::callAll('about_hook', $o);
### mod/subthread.php
- Addon::callHooks('post_local_end', $arr);
+ Hook::callAll('post_local_end', $arr);
### mod/profiles.php
- Addon::callHooks('profile_post', $_POST);
- Addon::callHooks('profile_edit', $arr);
+ Hook::callAll('profile_post', $_POST);
+ Hook::callAll('profile_edit', $arr);
### mod/settings.php
- Addon::callHooks('addon_settings_post', $_POST);
- Addon::callHooks('connector_settings_post', $_POST);
- Addon::callHooks('display_settings_post', $_POST);
- Addon::callHooks('settings_post', $_POST);
- Addon::callHooks('addon_settings', $settings_addons);
- Addon::callHooks('connector_settings', $settings_connectors);
- Addon::callHooks('display_settings', $o);
- Addon::callHooks('settings_form', $o);
+ Hook::callAll('addon_settings_post', $_POST);
+ Hook::callAll('connector_settings_post', $_POST);
+ Hook::callAll('display_settings_post', $_POST);
+ Hook::callAll('settings_post', $_POST);
+ Hook::callAll('addon_settings', $settings_addons);
+ Hook::callAll('connector_settings', $settings_connectors);
+ Hook::callAll('display_settings', $o);
+ Hook::callAll('settings_form', $o);
### mod/photos.php
- Addon::callHooks('photo_post_init', $_POST);
- Addon::callHooks('photo_post_file', $ret);
- Addon::callHooks('photo_post_end', $foo);
- Addon::callHooks('photo_post_end', $foo);
- Addon::callHooks('photo_post_end', $foo);
- Addon::callHooks('photo_post_end', $foo);
- Addon::callHooks('photo_post_end', intval($item_id));
- Addon::callHooks('photo_upload_form', $ret);
+ Hook::callAll('photo_post_init', $_POST);
+ Hook::callAll('photo_post_file', $ret);
+ Hook::callAll('photo_post_end', $foo);
+ Hook::callAll('photo_post_end', $foo);
+ Hook::callAll('photo_post_end', $foo);
+ Hook::callAll('photo_post_end', $foo);
+ Hook::callAll('photo_post_end', intval($item_id));
+ Hook::callAll('photo_upload_form', $ret);
### mod/profile.php
- Addon::callHooks('profile_advanced', $o);
+ Hook::callAll('profile_advanced', $o);
### mod/home.php
- Addon::callHooks('home_init', $ret);
- Addon::callHooks("home_content", $content);
+ Hook::callAll('home_init', $ret);
+ Hook::callAll("home_content", $content);
### mod/poke.php
- Addon::callHooks('post_local_end', $arr);
+ Hook::callAll('post_local_end', $arr);
### mod/contacts.php
- Addon::callHooks('contact_edit_post', $_POST);
- Addon::callHooks('contact_edit', $arr);
+ Hook::callAll('contact_edit_post', $_POST);
+ Hook::callAll('contact_edit', $arr);
### mod/tagger.php
- Addon::callHooks('post_local_end', $arr);
+ Hook::callAll('post_local_end', $arr);
### mod/lockview.php
- Addon::callHooks('lockview_content', $item);
+ Hook::callAll('lockview_content', $item);
### mod/uexport.php
- Addon::callHooks('uexport_options', $options);
+ Hook::callAll('uexport_options', $options);
### mod/register.php
- Addon::callHooks('register_post', $arr);
- Addon::callHooks('register_form', $arr);
+ Hook::callAll('register_post', $arr);
+ Hook::callAll('register_form', $arr);
### mod/item.php
- Addon::callHooks('post_local_start', $_REQUEST);
- Addon::callHooks('post_local', $datarray);
- Addon::callHooks('post_local_end', $datarray);
+ Hook::callAll('post_local_start', $_REQUEST);
+ Hook::callAll('post_local', $datarray);
+ Hook::callAll('post_local_end', $datarray);
### mod/editpost.php
- Addon::callHooks('jot_tool', $jotplugins);
+ Hook::callAll('jot_tool', $jotplugins);
### src/Network/FKOAuth1.php
- Addon::callHooks('logged_in', $a->user);
+ Hook::callAll('logged_in', $a->user);
### src/Render/FriendicaSmartyEngine.php
- Addon::callHooks("template_vars", $arr);
+ Hook::callAll("template_vars", $arr);
### src/App.php
- Addon::callHooks('load_config');
- Addon::callHooks('head');
- Addon::callHooks('footer');
+ Hook::callAll('load_config');
+ Hook::callAll('head');
+ Hook::callAll('footer');
### src/Model/Item.php
- Addon::callHooks('post_local', $item);
- Addon::callHooks('post_remote', $item);
- Addon::callHooks('post_local_end', $posted_item);
- Addon::callHooks('post_remote_end', $posted_item);
- Addon::callHooks('tagged', $arr);
- Addon::callHooks('post_local_end', $new_item);
+ Hook::callAll('post_local', $item);
+ Hook::callAll('post_remote', $item);
+ Hook::callAll('post_local_end', $posted_item);
+ Hook::callAll('post_remote_end', $posted_item);
+ Hook::callAll('tagged', $arr);
+ Hook::callAll('post_local_end', $new_item);
### src/Model/Contact.php
- Addon::callHooks('contact_photo_menu', $args);
- Addon::callHooks('follow', $arr);
+ Hook::callAll('contact_photo_menu', $args);
+ Hook::callAll('follow', $arr);
### src/Model/Profile.php
- Addon::callHooks('profile_sidebar_enter', $profile);
- Addon::callHooks('profile_sidebar', $arr);
- Addon::callHooks('profile_tabs', $arr);
- Addon::callHooks('zrl_init', $arr);
- Addon::callHooks('magic_auth_success', $arr);
+ Hook::callAll('profile_sidebar_enter', $profile);
+ Hook::callAll('profile_sidebar', $arr);
+ Hook::callAll('profile_tabs', $arr);
+ Hook::callAll('zrl_init', $arr);
+ Hook::callAll('magic_auth_success', $arr);
### src/Model/Event.php
- Addon::callHooks('event_updated', $event['id']);
- Addon::callHooks("event_created", $event['id']);
+ Hook::callAll('event_updated', $event['id']);
+ Hook::callAll("event_created", $event['id']);
### src/Model/User.php
- Addon::callHooks('register_account', $uid);
- Addon::callHooks('remove_user', $user);
+ Hook::callAll('register_account', $uid);
+ Hook::callAll('remove_user', $user);
### src/Content/Text/BBCode.php
- Addon::callHooks('bbcode', $text);
- Addon::callHooks('bb2diaspora', $text);
+ Hook::callAll('bbcode', $text);
+ Hook::callAll('bb2diaspora', $text);
### src/Content/Text/HTML.php
- Addon::callHooks('html2bbcode', $message);
+ Hook::callAll('html2bbcode', $message);
### src/Content/Smilies.php
- Addon::callHooks('smilie', $params);
+ Hook::callAll('smilie', $params);
### src/Content/Feature.php
- Addon::callHooks('isEnabled', $arr);
- Addon::callHooks('get', $arr);
+ Hook::callAll('isEnabled', $arr);
+ Hook::callAll('get', $arr);
### src/Content/ContactSelector.php
- Addon::callHooks('network_to_name', $nets);
- Addon::callHooks('gender_selector', $select);
- Addon::callHooks('sexpref_selector', $select);
- Addon::callHooks('marital_selector', $select);
+ Hook::callAll('network_to_name', $nets);
+ Hook::callAll('gender_selector', $select);
+ Hook::callAll('sexpref_selector', $select);
+ Hook::callAll('marital_selector', $select);
### src/Content/OEmbed.php
- Addon::callHooks('oembed_fetch_url', $embedurl, $j);
+ Hook::callAll('oembed_fetch_url', $embedurl, $j);
### src/Content/Nav.php
- Addon::callHooks('page_header', $a->page['nav']);
- Addon::callHooks('nav_info', $nav);
+ Hook::callAll('page_header', $a->page['nav']);
+ Hook::callAll('nav_info', $nav);
### src/Worker/Directory.php
- Addon::callHooks('globaldir_update', $arr);
+ Hook::callAll('globaldir_update', $arr);
### src/Worker/Notifier.php
- Addon::callHooks('notifier_end', $target_item);
+ Hook::callAll('notifier_end', $target_item);
### src/Worker/Queue.php
- Addon::callHooks('queue_predeliver', $r);
- Addon::callHooks('queue_deliver', $params);
+ Hook::callAll('queue_predeliver', $r);
+ Hook::callAll('queue_deliver', $params);
### src/Module/Login.php
- Addon::callHooks('authenticate', $addon_auth);
- Addon::callHooks('login_hook', $o);
+ Hook::callAll('authenticate', $addon_auth);
+ Hook::callAll('login_hook', $o);
### src/Module/Logout.php
- Addon::callHooks("logging_out");
+ Hook::callAll("logging_out");
### src/Object/Post.php
- Addon::callHooks('render_location', $locate);
- Addon::callHooks('display_item', $arr);
+ Hook::callAll('render_location', $locate);
+ Hook::callAll('display_item', $arr);
### src/Core/ACL.php
- Addon::callHooks('contact_select_options', $x);
- Addon::callHooks($a->module.'_pre_'.$selname, $arr);
- Addon::callHooks($a->module.'_post_'.$selname, $o);
- Addon::callHooks($a->module.'_pre_'.$selname, $arr);
- Addon::callHooks($a->module.'_post_'.$selname, $o);
- Addon::callHooks('jot_networks', $jotnets);
+ Hook::callAll('contact_select_options', $x);
+ Hook::callAll($a->module.'_pre_'.$selname, $arr);
+ Hook::callAll($a->module.'_post_'.$selname, $o);
+ Hook::callAll($a->module.'_pre_'.$selname, $arr);
+ Hook::callAll($a->module.'_post_'.$selname, $o);
+ Hook::callAll('jot_networks', $jotnets);
### src/Core/Authentication.php
- Addon::callHooks('logged_in', $a->user);
+ Hook::callAll('logged_in', $a->user);
### src/Core/Hook.php
### src/Core/Worker.php
- Addon::callHooks("proc_run", $arr);
+ Hook::callAll("proc_run", $arr);
### src/Util/Emailer.php
- Addon::callHooks('emailer_send_prepare', $params);
- Addon::callHooks("emailer_send", $hookdata);
+ Hook::callAll('emailer_send_prepare', $params);
+ Hook::callAll("emailer_send", $hookdata);
### src/Util/Map.php
- Addon::callHooks('generate_map', $arr);
- Addon::callHooks('generate_named_map', $arr);
- Addon::callHooks('Map::getCoordinates', $arr);
+ Hook::callAll('generate_map', $arr);
+ Hook::callAll('generate_named_map', $arr);
+ Hook::callAll('Map::getCoordinates', $arr);
### src/Util/Network.php
- Addon::callHooks('avatar_lookup', $avatar);
+ Hook::callAll('avatar_lookup', $avatar);
### src/Util/ParseUrl.php
- Addon::callHooks("getsiteinfo", $siteinfo);
+ Hook::callAll("getsiteinfo", $siteinfo);
### src/Protocol/DFRN.php
- Addon::callHooks('atom_feed_end', $atom);
- Addon::callHooks('atom_feed_end', $atom);
+ Hook::callAll('atom_feed_end', $atom);
+ Hook::callAll('atom_feed_end', $atom);
### view/js/main.js
### index.php
- Addon::callHooks('init_1');
- Addon::callHooks('app_menu', $arr);
- Addon::callHooks('page_content_top', $a->page['content']);
- Addon::callHooks($a->module.'_mod_init', $placeholder);
- Addon::callHooks($a->module.'_mod_init', $placeholder);
- Addon::callHooks($a->module.'_mod_post', $_POST);
- Addon::callHooks($a->module.'_mod_afterpost', $placeholder);
- Addon::callHooks($a->module.'_mod_content', $arr);
- Addon::callHooks($a->module.'_mod_aftercontent', $arr);
- Addon::callHooks('page_end', $a->page['content']);
+ Hook::callAll('init_1');
+ Hook::callAll('app_menu', $arr);
+ Hook::callAll('page_content_top', $a->page['content']);
+ Hook::callAll($a->module.'_mod_init', $placeholder);
+ Hook::callAll($a->module.'_mod_init', $placeholder);
+ Hook::callAll($a->module.'_mod_post', $_POST);
+ Hook::callAll($a->module.'_mod_afterpost', $placeholder);
+ Hook::callAll($a->module.'_mod_content', $arr);
+ Hook::callAll($a->module.'_mod_aftercontent', $arr);
+ Hook::callAll('page_end', $a->page['content']);
### include/api.php
- Addon::callHooks('logged_in', $a->user);
- Addon::callHooks('authenticate', $addon_auth);
- Addon::callHooks('logged_in', $a->user);
+ Hook::callAll('logged_in', $a->user);
+ Hook::callAll('authenticate', $addon_auth);
+ Hook::callAll('logged_in', $a->user);
### include/enotify.php
- Addon::callHooks('enotify', $h);
- Addon::callHooks('enotify_store', $datarray);
- Addon::callHooks('enotify_mail', $datarray);
- Addon::callHooks('check_item_notification', $notification_data);
+ Hook::callAll('enotify', $h);
+ Hook::callAll('enotify_store', $datarray);
+ Hook::callAll('enotify_mail', $datarray);
+ Hook::callAll('check_item_notification', $notification_data);
### include/conversation.php
- Addon::callHooks('conversation_start', $cb);
- Addon::callHooks('render_location', $locate);
- Addon::callHooks('display_item', $arr);
- Addon::callHooks('display_item', $arr);
- Addon::callHooks('item_photo_menu', $args);
- Addon::callHooks('jot_tool', $jotplugins);
+ Hook::callAll('conversation_start', $cb);
+ Hook::callAll('render_location', $locate);
+ Hook::callAll('display_item', $arr);
+ Hook::callAll('display_item', $arr);
+ Hook::callAll('item_photo_menu', $args);
+ Hook::callAll('jot_tool', $jotplugins);
### include/text.php
- Addon::callHooks('contact_block_end', $arr);
- Addon::callHooks('poke_verbs', $arr);
- Addon::callHooks('put_item_in_cache', $hook_data);
- Addon::callHooks('prepare_body_init', $item);
- Addon::callHooks('prepare_body_content_filter', $hook_data);
- Addon::callHooks('prepare_body', $hook_data);
- Addon::callHooks('prepare_body_final', $hook_data);
+ Hook::callAll('contact_block_end', $arr);
+ Hook::callAll('poke_verbs', $arr);
+ Hook::callAll('put_item_in_cache', $hook_data);
+ Hook::callAll('prepare_body_init', $item);
+ Hook::callAll('prepare_body_content_filter', $hook_data);
+ Hook::callAll('prepare_body', $hook_data);
+ Hook::callAll('prepare_body_final', $hook_data);
### include/items.php
- Addon::callHooks('page_info_data', $data);
+ Hook::callAll('page_info_data', $data);
### mod/directory.php
- Addon::callHooks('directory_item', $arr);
+ Hook::callAll('directory_item', $arr);
### mod/xrd.php
- Addon::callHooks('personal_xrd', $arr);
+ Hook::callAll('personal_xrd', $arr);
### mod/ping.php
- Addon::callHooks('network_ping', $arr);
+ Hook::callAll('network_ping', $arr);
### mod/parse_url.php
- Addon::callHooks("parse_link", $arr);
+ Hook::callAll("parse_link", $arr);
### mod/manage.php
- Addon::callHooks('home_init', $ret);
+ Hook::callAll('home_init', $ret);
### mod/acl.php
- Addon::callHooks('acl_lookup_end', $results);
+ Hook::callAll('acl_lookup_end', $results);
### mod/network.php
- Addon::callHooks('network_content_init', $arr);
- Addon::callHooks('network_tabs', $arr);
+ Hook::callAll('network_content_init', $arr);
+ Hook::callAll('network_tabs', $arr);
### mod/friendica.php
- Addon::callHooks('about_hook', $o);
+ Hook::callAll('about_hook', $o);
### mod/subthread.php
- Addon::callHooks('post_local_end', $arr);
+ Hook::callAll('post_local_end', $arr);
### mod/profiles.php
- Addon::callHooks('profile_post', $_POST);
- Addon::callHooks('profile_edit', $arr);
+ Hook::callAll('profile_post', $_POST);
+ Hook::callAll('profile_edit', $arr);
### mod/settings.php
- Addon::callHooks('addon_settings_post', $_POST);
- Addon::callHooks('connector_settings_post', $_POST);
- Addon::callHooks('display_settings_post', $_POST);
- Addon::callHooks('settings_post', $_POST);
- Addon::callHooks('addon_settings', $settings_addons);
- Addon::callHooks('connector_settings', $settings_connectors);
- Addon::callHooks('display_settings', $o);
- Addon::callHooks('settings_form', $o);
+ Hook::callAll('addon_settings_post', $_POST);
+ Hook::callAll('connector_settings_post', $_POST);
+ Hook::callAll('display_settings_post', $_POST);
+ Hook::callAll('settings_post', $_POST);
+ Hook::callAll('addon_settings', $settings_addons);
+ Hook::callAll('connector_settings', $settings_connectors);
+ Hook::callAll('display_settings', $o);
+ Hook::callAll('settings_form', $o);
### mod/photos.php
- Addon::callHooks('photo_post_init', $_POST);
- Addon::callHooks('photo_post_file', $ret);
- Addon::callHooks('photo_post_end', $foo);
- Addon::callHooks('photo_post_end', $foo);
- Addon::callHooks('photo_post_end', $foo);
- Addon::callHooks('photo_post_end', $foo);
- Addon::callHooks('photo_post_end', intval($item_id));
- Addon::callHooks('photo_upload_form', $ret);
+ Hook::callAll('photo_post_init', $_POST);
+ Hook::callAll('photo_post_file', $ret);
+ Hook::callAll('photo_post_end', $foo);
+ Hook::callAll('photo_post_end', $foo);
+ Hook::callAll('photo_post_end', $foo);
+ Hook::callAll('photo_post_end', $foo);
+ Hook::callAll('photo_post_end', intval($item_id));
+ Hook::callAll('photo_upload_form', $ret);
### mod/profile.php
- Addon::callHooks('profile_advanced', $o);
+ Hook::callAll('profile_advanced', $o);
### mod/home.php
- Addon::callHooks('home_init', $ret);
- Addon::callHooks("home_content", $content);
+ Hook::callAll('home_init', $ret);
+ Hook::callAll("home_content", $content);
### mod/poke.php
- Addon::callHooks('post_local_end', $arr);
+ Hook::callAll('post_local_end', $arr);
### mod/contacts.php
- Addon::callHooks('contact_edit_post', $_POST);
- Addon::callHooks('contact_edit', $arr);
+ Hook::callAll('contact_edit_post', $_POST);
+ Hook::callAll('contact_edit', $arr);
### mod/tagger.php
- Addon::callHooks('post_local_end', $arr);
+ Hook::callAll('post_local_end', $arr);
### mod/lockview.php
- Addon::callHooks('lockview_content', $item);
+ Hook::callAll('lockview_content', $item);
### mod/uexport.php
- Addon::callHooks('uexport_options', $options);
+ Hook::callAll('uexport_options', $options);
### mod/register.php
- Addon::callHooks('register_post', $arr);
- Addon::callHooks('register_form', $arr);
+ Hook::callAll('register_post', $arr);
+ Hook::callAll('register_form', $arr);
### mod/item.php
- Addon::callHooks('post_local_start', $_REQUEST);
- Addon::callHooks('post_local', $datarray);
- Addon::callHooks('post_local_end', $datarray);
+ Hook::callAll('post_local_start', $_REQUEST);
+ Hook::callAll('post_local', $datarray);
+ Hook::callAll('post_local_end', $datarray);
### mod/editpost.php
- Addon::callHooks('jot_tool', $jotplugins);
+ Hook::callAll('jot_tool', $jotplugins);
### src/Network/FKOAuth1.php
- Addon::callHooks('logged_in', $a->user);
+ Hook::callAll('logged_in', $a->user);
### src/Render/FriendicaSmartyEngine.php
- Addon::callHooks("template_vars", $arr);
+ Hook::callAll("template_vars", $arr);
### src/Model/Item.php
- Addon::callHooks('post_local', $item);
- Addon::callHooks('post_remote', $item);
- Addon::callHooks('post_local_end', $posted_item);
- Addon::callHooks('post_remote_end', $posted_item);
- Addon::callHooks('tagged', $arr);
- Addon::callHooks('post_local_end', $new_item);
+ Hook::callAll('post_local', $item);
+ Hook::callAll('post_remote', $item);
+ Hook::callAll('post_local_end', $posted_item);
+ Hook::callAll('post_remote_end', $posted_item);
+ Hook::callAll('tagged', $arr);
+ Hook::callAll('post_local_end', $new_item);
### src/Model/Contact.php
- Addon::callHooks('contact_photo_menu', $args);
- Addon::callHooks('follow', $arr);
+ Hook::callAll('contact_photo_menu', $args);
+ Hook::callAll('follow', $arr);
### src/Model/Profile.php
- Addon::callHooks('profile_sidebar_enter', $profile);
- Addon::callHooks('profile_sidebar', $arr);
- Addon::callHooks('profile_tabs', $arr);
- Addon::callHooks('zrl_init', $arr);
+ Hook::callAll('profile_sidebar_enter', $profile);
+ Hook::callAll('profile_sidebar', $arr);
+ Hook::callAll('profile_tabs', $arr);
+ Hook::callAll('zrl_init', $arr);
### src/Model/Event.php
- Addon::callHooks('event_updated', $event['id']);
- Addon::callHooks("event_created", $event['id']);
+ Hook::callAll('event_updated', $event['id']);
+ Hook::callAll("event_created", $event['id']);
### src/Model/User.php
- Addon::callHooks('register_account', $uid);
- Addon::callHooks('remove_user', $user);
+ Hook::callAll('register_account', $uid);
+ Hook::callAll('remove_user', $user);
### src/Content/Text/BBCode.php
- Addon::callHooks('bbcode', $text);
- Addon::callHooks('bb2diaspora', $text);
+ Hook::callAll('bbcode', $text);
+ Hook::callAll('bb2diaspora', $text);
### src/Content/Text/HTML.php
- Addon::callHooks('html2bbcode', $message);
+ Hook::callAll('html2bbcode', $message);
### src/Content/Smilies.php
- Addon::callHooks('smilie', $params);
+ Hook::callAll('smilie', $params);
### src/Content/Feature.php
- Addon::callHooks('isEnabled', $arr);
- Addon::callHooks('get', $arr);
+ Hook::callAll('isEnabled', $arr);
+ Hook::callAll('get', $arr);
### src/Content/ContactSelector.php
- Addon::callHooks('network_to_name', $nets);
- Addon::callHooks('gender_selector', $select);
- Addon::callHooks('sexpref_selector', $select);
- Addon::callHooks('marital_selector', $select);
+ Hook::callAll('network_to_name', $nets);
+ Hook::callAll('gender_selector', $select);
+ Hook::callAll('sexpref_selector', $select);
+ Hook::callAll('marital_selector', $select);
### src/Content/OEmbed.php
- Addon::callHooks('oembed_fetch_url', $embedurl, $j);
+ Hook::callAll('oembed_fetch_url', $embedurl, $j);
### src/Content/Nav.php
- Addon::callHooks('page_header', $a->page['nav']);
- Addon::callHooks('nav_info', $nav);
+ Hook::callAll('page_header', $a->page['nav']);
+ Hook::callAll('nav_info', $nav);
### src/Core/Authentication.php
- Addon::callHooks('logged_in', $a->user);
+ Hook::callAll('logged_in', $a->user);
### src/Worker/Directory.php
- Addon::callHooks('globaldir_update', $arr);
+ Hook::callAll('globaldir_update', $arr);
### src/Worker/Notifier.php
- Addon::callHooks('notifier_end', $target_item);
+ Hook::callAll('notifier_end', $target_item);
### src/Worker/Queue.php
- Addon::callHooks('queue_predeliver', $r);
- Addon::callHooks('queue_deliver', $params);
+ Hook::callAll('queue_predeliver', $r);
+ Hook::callAll('queue_deliver', $params);
### src/Module/Login.php
- Addon::callHooks('authenticate', $addon_auth);
- Addon::callHooks('login_hook', $o);
+ Hook::callAll('authenticate', $addon_auth);
+ Hook::callAll('login_hook', $o);
### src/Module/Logout.php
- Addon::callHooks("logging_out");
+ Hook::callAll("logging_out");
### src/Object/Post.php
- Addon::callHooks('render_location', $locate);
- Addon::callHooks('display_item', $arr);
+ Hook::callAll('render_location', $locate);
+ Hook::callAll('display_item', $arr);
### src/Core/ACL.php
- Addon::callHooks('contact_select_options', $x);
- Addon::callHooks($a->module.'_pre_'.$selname, $arr);
- Addon::callHooks($a->module.'_post_'.$selname, $o);
- Addon::callHooks($a->module.'_pre_'.$selname, $arr);
- Addon::callHooks($a->module.'_post_'.$selname, $o);
- Addon::callHooks('jot_networks', $jotnets);
+ Hook::callAll('contact_select_options', $x);
+ Hook::callAll($a->module.'_pre_'.$selname, $arr);
+ Hook::callAll($a->module.'_post_'.$selname, $o);
+ Hook::callAll($a->module.'_pre_'.$selname, $arr);
+ Hook::callAll($a->module.'_post_'.$selname, $o);
+ Hook::callAll('jot_networks', $jotnets);
### src/Core/Worker.php
- Addon::callHooks("proc_run", $arr);
+ Hook::callAll("proc_run", $arr);
### src/Util/Emailer.php
- Addon::callHooks('emailer_send_prepare', $params);
- Addon::callHooks("emailer_send", $hookdata);
+ Hook::callAll('emailer_send_prepare', $params);
+ Hook::callAll("emailer_send", $hookdata);
### src/Util/Map.php
- Addon::callHooks('generate_map', $arr);
- Addon::callHooks('generate_named_map', $arr);
- Addon::callHooks('Map::getCoordinates', $arr);
+ Hook::callAll('generate_map', $arr);
+ Hook::callAll('generate_named_map', $arr);
+ Hook::callAll('Map::getCoordinates', $arr);
### src/Util/Network.php
- Addon::callHooks('avatar_lookup', $avatar);
+ Hook::callAll('avatar_lookup', $avatar);
### src/Util/ParseUrl.php
- Addon::callHooks("getsiteinfo", $siteinfo);
+ Hook::callAll("getsiteinfo", $siteinfo);
### src/Protocol/DFRN.php
- Addon::callHooks('atom_feed_end', $atom);
- Addon::callHooks('atom_feed_end', $atom);
+ Hook::callAll('atom_feed_end', $atom);
+ Hook::callAll('atom_feed_end', $atom);
use Friendica\Content\Feature;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
-use Friendica\Core\Addon;
use Friendica\Core\Authentication;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\NotificationsManager;
list($consumer, $token) = $oauth1->verify_request($request);
if (!is_null($token)) {
$oauth1->loginUser($token->uid);
- Addon::callHooks('logged_in', $a->user);
+ Hook::callAll('logged_in', $a->user);
return;
}
echo __FILE__.__LINE__.__FUNCTION__ . "<pre>";
* Addons should never set 'authenticated' except to indicate success - as hooks may be chained
* and later addons should not interfere with an earlier one that succeeded.
*/
- Addon::callHooks('authenticate', $addon_auth);
+ Hook::callAll('authenticate', $addon_auth);
if ($addon_auth['authenticated'] && count($addon_auth['user_record'])) {
$record = $addon_auth['user_record'];
$_SESSION["allow_api"] = true;
- Addon::callHooks('logged_in', $a->user);
+ Hook::callAll('logged_in', $a->user);
}
/**
use Friendica\Content\Feature;
use Friendica\Content\Pager;
use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
}
$cb = ['items' => $items, 'mode' => $mode, 'update' => $update, 'preview' => $preview];
- Addon::callHooks('conversation_start',$cb);
+ Hook::callAll('conversation_start',$cb);
$items = $cb['items'];
}
$locate = ['location' => $item['location'], 'coord' => $item['coord'], 'html' => ''];
- Addon::callHooks('render_location',$locate);
+ Hook::callAll('render_location',$locate);
$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate));
];
$arr = ['item' => $item, 'output' => $tmp_item];
- Addon::callHooks('display_item', $arr);
+ Hook::callAll('display_item', $arr);
$threads[$threadsid]['id'] = $item['id'];
$threads[$threadsid]['network'] = $item['network'];
/// @todo Check if this call is needed or not
$arr = ['item' => $item];
- Addon::callHooks('display_item', $arr);
+ Hook::callAll('display_item', $arr);
$item['pagedrop'] = $page_dropping;
$args = ['item' => $item, 'menu' => $menu];
- Addon::callHooks('item_photo_menu', $args);
+ Hook::callAll('item_photo_menu', $args);
$menu = $args['menu'];
]);
$jotplugins = '';
- Addon::callHooks('jot_tool', $jotplugins);
+ Hook::callAll('jot_tool', $jotplugins);
// Private/public post links for the non-JS ACL form
$private_post = 1;
*/
use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
'itemlink' => $itemlink
];
- Addon::callHooks('enotify', $h);
+ Hook::callAll('enotify', $h);
$subject = $h['subject'];
$datarray['otype'] = $params['otype'];
$datarray['abort'] = false;
- Addon::callHooks('enotify_store', $datarray);
+ Hook::callAll('enotify_store', $datarray);
if ($datarray['abort']) {
L10n::popLang();
$datarray['subject'] = $subject;
$datarray['headers'] = $additional_mail_header;
- Addon::callHooks('enotify_mail', $datarray);
+ Hook::callAll('enotify_mail', $datarray);
// check whether sending post content in email notifications is allowed
// always true for SYSTEM_EMAIL
*/
function check_item_notification($itemid, $uid, $defaulttype = "") {
$notification_data = ["uid" => $uid, "profiles" => []];
- Addon::callHooks('check_item_notification', $notification_data);
+ Hook::callAll('check_item_notification', $notification_data);
$profiles = $notification_data["profiles"];
use Friendica\BaseObject;
use Friendica\Content\Feature;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
require_once 'mod/share.php';
function add_page_info_data(array $data, $no_photos = false)
{
- Addon::callHooks('page_info_data', $data);
+ Hook::callAll('page_info_data', $data);
if (empty($data['type'])) {
return '';
use Friendica\App;
use Friendica\Content\Widget;
use Friendica\Core\ACL;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Database\DBA;
'search' => $search,
];
- Addon::callHooks('acl_lookup_end', $results);
+ Hook::callAll('acl_lookup_end', $results);
$o = [
'tot' => $results['tot'],
use Friendica\Content\Nav;
use Friendica\Content\Pager;
use Friendica\Content\Widget;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
$arr = ['contact' => $rr, 'entry' => $entry];
- Addon::callHooks('directory_item', $arr);
+ Hook::callAll('directory_item', $arr);
unset($profile);
unset($location);
*/
use Friendica\App;
use Friendica\Content\Feature;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBA;
$o .= '</tbody></table></div>' . PHP_EOL;
}
- Addon::callHooks('about_hook', $o);
+ Hook::callAll('about_hook', $o);
return $o;
}
* @file mod/home.php
*/
use Friendica\App;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Core\System;
function home_init(App $a) {
$ret = [];
- Addon::callHooks('home_init',$ret);
+ Hook::callAll('home_init',$ret);
if (local_user() && ($a->user['nickname'])) {
$a->internalRedirect('network');
$login = Login::form($a->query_string, intval(Config::get('config', 'register_policy')) === REGISTER_CLOSED ? 0 : 1);
$content = '';
- Addon::callHooks("home_content",$content);
+ Hook::callAll("home_content",$content);
$tpl = Renderer::getMarkupTemplate('home.tpl');
use Friendica\Content\Pager;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
exit();
}
- Addon::callHooks('post_local_start', $_REQUEST);
+ Hook::callAll('post_local_start', $_REQUEST);
Logger::log('postvars ' . print_r($_REQUEST, true), Logger::DATA);
exit();
}
- Addon::callHooks('post_local',$datarray);
+ Hook::callAll('post_local',$datarray);
if (!empty($datarray['cancel'])) {
Logger::log('mod_item: post cancelled by addon.');
}
}
- Addon::callHooks('post_local_end', $datarray);
+ Hook::callAll('post_local_end', $datarray);
if (strlen($emailcc) && $profile_uid == local_user()) {
$erecips = explode(',', $emailcc);
* @file mod/lockview.php
*/
use Friendica\App;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Database\DBA;
use Friendica\Model\Item;
exit();
}
- Addon::callHooks('lockview_content', $item);
+ Hook::callAll('lockview_content', $item);
if ($item['uid'] != local_user()) {
echo L10n::t('Remote privacy information not available.') . '<br />';
*/
use Friendica\App;
use Friendica\Core\Authentication;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
-use Friendica\Core\System;
use Friendica\Database\DBA;
function manage_post(App $a) {
}
$ret = [];
- Addon::callHooks('home_init',$ret);
+ Hook::callAll('home_init',$ret);
$a->internalRedirect('profile/' . $a->user['nickname'] );
// NOTREACHED
use Friendica\Content\Widget;
use Friendica\Content\Text\HTML;
use Friendica\Core\ACL;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
/// @TODO Is this really necessary? $a is already available to hooks
$arr = ['query' => $a->query_string];
- Addon::callHooks('network_content_init', $arr);
+ Hook::callAll('network_content_init', $arr);
$flat_mode = false;
}
$arr = ['tabs' => $tabs];
- Addon::callHooks('network_tabs', $arr);
+ Hook::callAll('network_tabs', $arr);
$tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
* @see ParseUrl::getSiteinfo() for more information about scraping embeddable content
*/
use Friendica\App;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Util\Network;
use Friendica\Util\ParseUrl;
$arr = ['url' => $url, 'text' => ''];
- Addon::callHooks('parse_link', $arr);
+ Hook::callAll('parse_link', $arr);
if (strlen($arr['text'])) {
echo $arr['text'];
use Friendica\Content\Pager;
use Friendica\Content\Text\BBCode;
use Friendica\Core\ACL;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Core\System;
-use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
use Friendica\Model\Group;
// default post action - upload a photo
- Addon::callHooks('photo_post_init', $_POST);
+ Hook::callAll('photo_post_init', $_POST);
// Determine the album to use
$album = !empty($_REQUEST['album']) ? Strings::escapeTags(trim($_REQUEST['album'])) : '';
$ret = ['src' => '', 'filename' => '', 'filesize' => 0, 'type' => ''];
- Addon::callHooks('photo_post_file', $ret);
+ Hook::callAll('photo_post_file', $ret);
if (!empty($ret['src']) && !empty($ret['filesize'])) {
$src = $ret['src'];
}
@unlink($src);
$foo = 0;
- Addon::callHooks('photo_post_end', $foo);
+ Hook::callAll('photo_post_end', $foo);
return;
}
notice(L10n::t('Image exceeds size limit of %s', Strings::formatBytes($maximagesize)) . EOL);
@unlink($src);
$foo = 0;
- Addon::callHooks('photo_post_end', $foo);
+ Hook::callAll('photo_post_end', $foo);
return;
}
notice(L10n::t('Image file is empty.') . EOL);
@unlink($src);
$foo = 0;
- Addon::callHooks('photo_post_end', $foo);
+ Hook::callAll('photo_post_end', $foo);
return;
}
notice(L10n::t('Unable to process image.') . EOL);
@unlink($src);
$foo = 0;
- Addon::callHooks('photo_post_end',$foo);
+ Hook::callAll('photo_post_end',$foo);
exit();
}
// Update the photo albums cache
Photo::clearAlbumCache($page_owner_uid);
- Addon::callHooks('photo_post_end', $item_id);
+ Hook::callAll('photo_post_end', $item_id);
// addon uploaders should call "killme()" [e.g. exit] within the photo_post_end hook
// if they do not wish to be redirected
'addon_text' => $uploader,
'default_upload' => true];
- Addon::callHooks('photo_upload_form',$ret);
+ Hook::callAll('photo_upload_form',$ret);
$default_upload_box = Renderer::replaceMacros(Renderer::getMarkupTemplate('photos_default_uploader_box.tpl'), []);
$default_upload_submit = Renderer::replaceMacros(Renderer::getMarkupTemplate('photos_default_uploader_submit.tpl'), [
*/
use Friendica\App;
-use Friendica\Content\Feature;
use Friendica\Content\ForumManager;
use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
if (DBA::isResult($items)) {
$items_unseen = Item::inArray($items);
$arr = ['items' => $items_unseen];
- Addon::callHooks('network_ping', $arr);
+ Hook::callAll('network_ping', $arr);
foreach ($items_unseen as $item) {
if ($item['wall']) {
*/
use Friendica\App;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Core\System;
-use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\Model\Item;
use Friendica\Util\Strings;
$arr['object'] .= XML::escape('<link rel="photo" type="image/jpeg" href="' . $target['photo'] . '" />' . "\n");
$arr['object'] .= '</link></object>' . "\n";
- $item_id = Item::insert($arr);
+ Item::insert($arr);
- Addon::callHooks('post_local_end', $arr);
+ Hook::callAll('post_local_end', $arr);
return;
}
return;
}
- $name = '';
- $id = '';
-
if (empty($_GET['c'])) {
return;
}
use Friendica\Content\Pager;
use Friendica\Content\Widget;
use Friendica\Core\ACL;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
-use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBA;
if ($tab === 'profile') {
$o .= Profile::getAdvanced($a);
- Addon::callHooks('profile_advanced', $o);
+ Hook::callAll('profile_advanced', $o);
return $o;
}
use Friendica\Content\ContactSelector;
use Friendica\Content\Feature;
use Friendica\Content\Nav;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
$namechanged = false;
- Addon::callHooks('profile_post', $_POST);
+ Hook::callAll('profile_post', $_POST);
if (($a->argc > 1) && ($a->argv[1] !== "new") && intval($a->argv[1])) {
$orig = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
]);
$arr = ['profile' => $r[0], 'entry' => $o];
- Addon::callHooks('profile_edit', $arr);
+ Hook::callAll('profile_edit', $arr);
return $o;
} else {
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
$blocked = 1;
$arr = ['post' => $_POST];
- Addon::callHooks('register_post', $arr);
+ Hook::callAll('register_post', $arr);
$max_dailies = intval(Config::get('system', 'max_daily_registrations'));
if ($max_dailies) {
$arr = ['template' => $tpl];
- Addon::callHooks('register_form', $arr);
+ Hook::callAll('register_form', $arr);
$tpl = $arr['template'];
use Friendica\Content\Feature;
use Friendica\Content\Nav;
use Friendica\Core\ACL;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
if (($a->argc > 1) && ($a->argv[1] == 'addon')) {
BaseModule::checkFormSecurityTokenRedirectOnError('/settings/addon', 'settings_addon');
- Addon::callHooks('addon_settings_post', $_POST);
+ Hook::callAll('addon_settings_post', $_POST);
return;
}
}
}
- Addon::callHooks('connector_settings_post', $_POST);
+ Hook::callAll('connector_settings_post', $_POST);
return;
}
intval(local_user())
);
- Addon::callHooks('display_settings_post', $_POST);
+ Hook::callAll('display_settings_post', $_POST);
$a->internalRedirect('settings/display');
return; // NOTREACHED
}
$a->internalRedirect('settings');
}
- Addon::callHooks('settings_post', $_POST);
+ Hook::callAll('settings_post', $_POST);
if (!empty($_POST['password']) || !empty($_POST['confirm'])) {
$newpass = $_POST['password'];
$settings_addons = L10n::t('No Addon settings configured');
}
- Addon::callHooks('addon_settings', $settings_addons);
+ Hook::callAll('addon_settings', $settings_addons);
$tpl = Renderer::getMarkupTemplate('settings/addons.tpl');
}
$settings_connectors = '';
- Addon::callHooks('connector_settings', $settings_connectors);
+ Hook::callAll('connector_settings', $settings_connectors);
if (is_site_admin()) {
$diasp_enabled = L10n::t('Built-in support for %s connectivity is %s', L10n::t('Diaspora'), ((Config::get('system', 'diaspora_enabled')) ? L10n::t('enabled') : L10n::t('disabled')));
'$submit' => L10n::t('Save Settings'),
]);
- Addon::callHooks('display_settings', $o);
+ Hook::callAll('display_settings', $o);
return $o;
}
]);
- Addon::callHooks('settings_form', $o);
+ Hook::callAll('settings_form', $o);
$o .= '</form>' . "\r\n";
* @file mod/subthread.php
*/
use Friendica\App;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\System;
$arr['id'] = $post_id;
- Addon::callHooks('post_local_end', $arr);
+ Hook::callAll('post_local_end', $arr);
exit();
* @file mod/tagger.php
*/
use Friendica\App;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\System;
$arr['id'] = $post_id;
- Addon::callHooks('post_local_end', $arr);
+ Hook::callAll('post_local_end', $arr);
Worker::add(PRIORITY_HIGH, "Notifier", "tag", $post_id);
* @file mod/uexport.php
*/
use Friendica\App;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Core\System;
['uexport/account', L10n::t('Export account'), L10n::t('Export your account info and contacts. Use this to make a backup of your account and/or to move it to another server.')],
['uexport/backup', L10n::t('Export all'), L10n::t("Export your accout info, contacts and all your items as json. Could be a very big file, and could take a lot of time. Use this to make a full backup of your account \x28photos are not exported\x29")],
];
- Addon::callHooks('uexport_options', $options);
+ Hook::callAll('uexport_options', $options);
$tpl = Renderer::getMarkupTemplate("uexport.tpl");
return Renderer::replaceMacros($tpl, [
*/
use Friendica\App;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\Renderer;
use Friendica\Core\System;
use Friendica\Database\DBA;
);
$arr = ['user' => $r, 'xml' => $o];
- Addon::callHooks('personal_xrd', $arr);
+ Hook::callAll('personal_xrd', $arr);
echo $arr['xml'];
exit();
$touch_icon = 'images/friendica-128.png';
}
- Core\Addon::callHooks('head', $this->page['htmlhead']);
+ Core\Hook::callAll('head', $this->page['htmlhead']);
$tpl = Core\Renderer::getMarkupTemplate('head.tpl');
/* put the head template at the beginning of page['htmlhead']
]);
}
- Core\Addon::callHooks('footer', $this->page['footer']);
+ Core\Hook::callAll('footer', $this->page['footer']);
$tpl = Core\Renderer::getMarkupTemplate('footer.tpl');
$this->page['footer'] = Core\Renderer::replaceMacros($tpl, [
}
Core\Session::init();
- Core\Addon::callHooks('init_1');
+ Core\Hook::callAll('init_1');
}
// Exclude the backend processes from the session management
$this->page['page_title'] = $this->module;
$placeholder = '';
- Core\Addon::callHooks($this->module . '_mod_init', $placeholder);
+ Core\Hook::callAll($this->module . '_mod_init', $placeholder);
call_user_func([$this->module_class, 'init']);
if ($this->module_loaded) {
if (! $this->error && $_SERVER['REQUEST_METHOD'] === 'POST') {
- Core\Addon::callHooks($this->module . '_mod_post', $_POST);
+ Core\Hook::callAll($this->module . '_mod_post', $_POST);
call_user_func([$this->module_class, 'post']);
}
if (! $this->error) {
- Core\Addon::callHooks($this->module . '_mod_afterpost', $placeholder);
+ Core\Hook::callAll($this->module . '_mod_afterpost', $placeholder);
call_user_func([$this->module_class, 'afterpost']);
}
if (! $this->error) {
$arr = ['content' => $content];
- Core\Addon::callHooks($this->module . '_mod_content', $arr);
+ Core\Hook::callAll($this->module . '_mod_content', $arr);
$content = $arr['content'];
$arr = ['content' => call_user_func([$this->module_class, 'content'])];
- Core\Addon::callHooks($this->module . '_mod_aftercontent', $arr);
+ Core\Hook::callAll($this->module . '_mod_aftercontent', $arr);
$content .= $arr['content'];
}
}
// initialise content region
if ($this->getMode()->isNormal()) {
- Core\Addon::callHooks('page_content_top', $this->page['content']);
+ Core\Hook::callAll('page_content_top', $this->page['content']);
}
$this->page['content'] .= $content;
}
// Report anything which needs to be communicated in the notification area (before the main body)
- Core\Addon::callHooks('page_end', $this->page['content']);
+ Core\Hook::callAll('page_end', $this->page['content']);
// Add the navigation (menu) template
if ($this->module != 'install' && $this->module != 'maintenance') {
*/
namespace Friendica\Content;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Protocol;
-use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Util\Network;
use Friendica\Util\Strings;
Protocol::PNUT => L10n::t('pnut'),
];
- Addon::callHooks('network_to_name', $nets);
+ Hook::callAll('network_to_name', $nets);
$search = array_keys($nets);
$replace = array_values($nets);
/**
* @param string $current optional, default empty
* @param string $suffix optionsl, default empty
+ * @return string
*/
public static function gender($current = "", $suffix = "")
{
'Undecided' => L10n::t('Undecided'),
];
- Addon::callHooks('gender_selector', $select);
+ Hook::callAll('gender_selector', $select);
$o .= "<select name=\"gender$suffix\" id=\"gender-select$suffix\" size=\"1\" >";
foreach ($select as $neutral => $selection) {
/**
* @param string $current optional, default empty
* @param string $suffix optionsl, default empty
+ * @return string
*/
public static function sexualPreference($current = "", $suffix = "")
{
'Nonsexual' => L10n::t('Nonsexual'),
];
- Addon::callHooks('sexpref_selector', $select);
+ Hook::callAll('sexpref_selector', $select);
$o .= "<select name=\"sexual$suffix\" id=\"sexual-select$suffix\" size=\"1\" >";
foreach ($select as $neutral => $selection) {
/**
* @param string $current optional, default empty
+ * @return string
*/
public static function maritalStatus($current = "")
{
'Ask me' => L10n::t('Ask me'),
];
- Addon::callHooks('marital_selector', $select);
+ Hook::callAll('marital_selector', $select);
$o .= '<select name="marital" id="marital-select" size="1" >';
foreach ($select as $neutral => $selection) {
*/
namespace Friendica\Content;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
}
$arr = ['uid' => $uid, 'feature' => $feature, 'enabled' => $x];
- Addon::callHooks('isEnabled', $arr);
+ Hook::callAll('isEnabled', $arr);
return($arr['enabled']);
}
}
}
- Addon::callHooks('get', $arr);
+ Hook::callAll('get', $arr);
return $arr;
}
}
namespace Friendica\Content;
use Friendica\App;
-use Friendica\Content\Feature;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Core\System;
'$search_hint' => L10n::t('@name, !forum, #tags, content')
]);
- Addon::callHooks('page_header', $nav);
+ Hook::callAll('page_header', $nav);
return $nav;
}
if (local_user() || !$privateapps) {
$arr = ['app_menu' => self::$app_menu];
- Addon::callHooks('app_menu', $arr);
+ Hook::callAll('app_menu', $arr);
self::$app_menu = $arr['app_menu'];
}
$banner = '<a href="https://friendi.ca"><img id="logo-img" src="images/friendica-32.png" alt="logo" /></a><span id="logo-text"><a href="https://friendi.ca">Friendica</a></span>';
}
- Addon::callHooks('nav_info', $nav);
+ Hook::callAll('nav_info', $nav);
return [
'sitelocation' => $sitelocation,
use DOMText;
use DOMXPath;
use Exception;
-use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Core\System;
}
}
- Addon::callHooks('oembed_fetch_url', $embedurl, $oembed);
+ Hook::callAll('oembed_fetch_url', $embedurl, $oembed);
return $oembed;
}
*/
namespace Friendica\Content;
-use Friendica\App;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Util\Strings;
];
$params = ['texts' => $texts, 'icons' => $icons];
- Addon::callHooks('smilie', $params);
+ Hook::callAll('smilie', $params);
return $params;
}
use Friendica\BaseObject;
use Friendica\Content\OEmbed;
use Friendica\Content\Smilies;
-use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
//$Text = str_replace('<br /><li>', '<li>', $Text);
//$Text = str_replace('<br /><ul', '<ul ', $Text);
- Addon::callHooks('bbcode', $text);
+ Hook::callAll('bbcode', $text);
return trim($text);
}
);
}
- Addon::callHooks('bb2diaspora', $text);
+ Hook::callAll('bb2diaspora', $text);
return $text;
}
use DOMDocument;
use DOMXPath;
-use Friendica\Content\Feature;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
$message = preg_replace('=\r *\r=i', "\n", $message);
$message = str_replace("\r", "\n", $message);
- Addon::callHooks('html2bbcode', $message);
+ Hook::callAll('html2bbcode', $message);
$message = strip_tags($message);
$arr = ['contacts' => $r, 'output' => $o];
- Addon::callHooks('contact_block_end', $arr);
+ Hook::callAll('contact_block_end', $arr);
return $o;
}
use Friendica\BaseObject;
use Friendica\Content\Feature;
-use Friendica\Core\Protocol;
-use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
$x = ['options' => $options, 'size' => $size, 'single' => $single, 'mutual' => $mutual, 'exclude' => $exclude, 'networks' => $networks];
- Addon::callHooks('contact_select_options', $x);
+ Hook::callAll('contact_select_options', $x);
$o = '';
$arr = ['contact' => $contacts, 'entry' => $o];
// e.g. 'network_pre_contact_deny', 'profile_pre_contact_allow'
- Addon::callHooks($a->module . '_pre_' . $selname, $arr);
+ Hook::callAll($a->module . '_pre_' . $selname, $arr);
if (DBA::isResult($contacts)) {
foreach ($contacts as $contact) {
$o .= '</select>' . PHP_EOL;
- Addon::callHooks($a->module . '_post_' . $selname, $o);
+ Hook::callAll($a->module . '_post_' . $selname, $o);
return $o;
}
$arr = ['contact' => $contacts, 'entry' => $o];
// e.g. 'network_pre_contact_deny', 'profile_pre_contact_allow'
- Addon::callHooks($a->module . '_pre_' . $selname, $arr);
+ Hook::callAll($a->module . '_pre_' . $selname, $arr);
$receiverlist = [];
$o .= implode(', ', $receiverlist);
}
- Addon::callHooks($a->module . '_post_' . $selname, $o);
+ Hook::callAll($a->module . '_post_' . $selname, $o);
return $o;
}
$jotnets .= '<div class="profile-jot-net"><input type="checkbox" name="pubmail_enable"' . $selected . ' value="1" /> ' . L10n::t("Post to Email") . '</div>';
}
- Addon::callHooks('jot_networks', $jotnets);
+ Hook::callAll('jot_networks', $jotnets);
} else {
$jotnets .= L10n::t('Connectors disabled, since "%s" is enabled.',
L10n::t('Hide your profile details from unknown viewers?'));
namespace Friendica\Core;
use Friendica\BaseObject;
-use Friendica\Core\Addon;
-use Friendica\Core\Config;
-use Friendica\Core\L10n;
-use Friendica\Core\Logger;
-use Friendica\Core\PConfig;
use Friendica\Database\DBA;
use Friendica\Model\User;
use Friendica\Util\DateTimeFormat;
}
if ($login_initial) {
- Addon::callHooks('logged_in', $a->user);
+ Hook::callAll('logged_in', $a->user);
if (($a->module !== 'home') && isset($_SESSION['return_path'])) {
$a->internalRedirect($_SESSION['return_path']);
use Friendica\BaseObject;
use Friendica\Database\DBA;
-use Friendica\Core\Addon;
-use Friendica\Core\Logger;
-use Friendica\Core\System;
/**
* Provide Language, Translation, and Localization functions to the application
'rebuff' => ['rebuffed', self::t('rebuff'), self::t('rebuffed')],
];
- Addon::callHooks('poke_verbs', $arr);
+ Hook::callAll('poke_verbs', $arr);
return $arr;
}
namespace Friendica\Core;
use Friendica\BaseObject;
-use Friendica\Core\Logger;
use Friendica\Database\DBA;
use Friendica\Model\Process;
use Friendica\Util\DateTimeFormat;
$arr = ['args' => $args, 'run_cmd' => true];
- Addon::callHooks("proc_run", $arr);
+ Hook::callAll("proc_run", $arr);
if (!$arr['run_cmd'] || !count($args)) {
return true;
}
use Friendica\BaseObject;
use Friendica\Content\Pager;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
$args = ['contact' => $contact, 'menu' => &$menu];
- Addon::callHooks('contact_photo_menu', $args);
+ Hook::callAll('contact_photo_menu', $args);
$menucondensed = [];
use Friendica\BaseObject;
use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
$item_id = 0;
}
- Addon::callHooks('event_updated', $event['id']);
+ Hook::callAll('event_updated', $event['id']);
} else {
$event['guid'] = defaults($arr, 'guid', System::createUUID());
$item_id = Item::insert($item_arr);
}
- Addon::callHooks("event_created", $event['id']);
+ Hook::callAll("event_created", $event['id']);
}
return $item_id;
use Friendica\BaseObject;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\Lock;
use Friendica\Core\Logger;
use Friendica\Core\L10n;
if ($notify) {
$item['edit'] = false;
$item['parent'] = $parent_id;
- Addon::callHooks('post_local', $item);
+ Hook::callAll('post_local', $item);
unset($item['edit']);
unset($item['parent']);
} else {
- Addon::callHooks('post_remote', $item);
+ Hook::callAll('post_remote', $item);
}
// This array field is used to trigger some automatic reactions
$posted_item = self::selectFirst(self::ITEM_FIELDLIST, ['id' => $current_post]);
if (DBA::isResult($posted_item)) {
if ($notify) {
- Addon::callHooks('post_local_end', $posted_item);
+ Hook::callAll('post_local_end', $posted_item);
} else {
- Addon::callHooks('post_remote_end', $posted_item);
+ Hook::callAll('post_remote_end', $posted_item);
}
} else {
Logger::log('new item not found in DB, id ' . $current_post);
$arr = ['item' => $item, 'user' => $user];
- Addon::callHooks('tagged', $arr);
+ Hook::callAll('tagged', $arr);
if (!$community_page && !$prvgroup) {
return;
$new_item['id'] = $new_item_id;
- Addon::callHooks('post_local_end', $new_item);
+ Hook::callAll('post_local_end', $new_item);
return true;
}
$item["rendered-hash"] = hash("md5", $item["body"]);
$hook_data = ['item' => $item, 'rendered-html' => $item['rendered-html'], 'rendered-hash' => $item['rendered-hash']];
- Addon::callHooks('put_item_in_cache', $hook_data);
+ Hook::callAll('put_item_in_cache', $hook_data);
$item['rendered-html'] = $hook_data['rendered-html'];
$item['rendered-hash'] = $hook_data['rendered-hash'];
unset($hook_data);
public static function prepareBody(array &$item, $attach = false, $is_preview = false)
{
$a = self::getApp();
- Addon::callHooks('prepare_body_init', $item);
+ Hook::callAll('prepare_body_init', $item);
// In order to provide theme developers more possibilities, event items
// are treated differently.
'item' => $item,
'filter_reasons' => $filter_reasons
];
- Addon::callHooks('prepare_body_content_filter', $hook_data);
+ Hook::callAll('prepare_body_content_filter', $hook_data);
$filter_reasons = $hook_data['filter_reasons'];
unset($hook_data);
}
'preview' => $is_preview,
'filter_reasons' => $filter_reasons
];
- Addon::callHooks('prepare_body', $hook_data);
+ Hook::callAll('prepare_body', $hook_data);
$s = $hook_data['html'];
unset($hook_data);
$s = HTML::applyContentFilter($s, $filter_reasons);
$hook_data = ['item' => $item, 'html' => $s];
- Addon::callHooks('prepare_body_final', $hook_data);
+ Hook::callAll('prepare_body_final', $hook_data);
return $hook_data['html'];
}
use Friendica\Content\ForumManager;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
-use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
$profile['network_link'] = '';
}
- Addon::callHooks('profile_sidebar_enter', $profile);
+ Hook::callAll('profile_sidebar_enter', $profile);
// don't show connect link to yourself
$arr = ['profile' => &$profile, 'entry' => &$o];
- Addon::callHooks('profile_sidebar', $arr);
+ Hook::callAll('profile_sidebar', $arr);
return $o;
}
}
$arr = ['is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => $tab, 'tabs' => $tabs];
- Addon::callHooks('profile_tabs', $arr);
+ Hook::callAll('profile_tabs', $arr);
$tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
}
$arr = ['zrl' => $my_url, 'url' => $a->cmd];
- Addon::callHooks('zrl_init', $arr);
+ Hook::callAll('zrl_init', $arr);
// Try to find the public contact entry of the visitor.
$cid = Contact::getIdForURL($my_url);
* * \e array \b visitor
* * \e string \b url
*/
- Addon::callHooks('magic_auth_success', $arr);
+ Hook::callAll('magic_auth_success', $arr);
$a->contact = $arr['visitor'];
use DivineOmega\PasswordExposed;
use Exception;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
}
}
- Addon::callHooks('register_account', $uid);
+ Hook::callAll('register_account', $uid);
$return['user'] = $user;
return $return;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Widget;
use Friendica\Core\ACL;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
return; // NOTREACHED
}
- Addon::callHooks('contact_edit_post', $_POST);
+ Hook::callAll('contact_edit_post', $_POST);
$profile_id = intval(defaults($_POST, 'profile-assign', 0));
if ($profile_id) {
$arr = ['contact' => $contact, 'output' => $o];
- Addon::callHooks('contact_edit', $arr);
+ Hook::callAll('contact_edit', $arr);
return $arr['output'];
}
use Exception;
use Friendica\BaseModule;
-use Friendica\Core\Addon;
use Friendica\Core\Authentication;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
* Addons should never set 'authenticated' except to indicate success - as hooks may be chained
* and later addons should not interfere with an earlier one that succeeded.
*/
- Addon::callHooks('authenticate', $addon_auth);
+ Hook::callAll('authenticate', $addon_auth);
try {
if ($addon_auth['authenticated']) {
]
);
- Addon::callHooks('login_hook', $o);
+ Hook::callAll('login_hook', $o);
return $o;
}
/**
* @file src/Module/Logout.php
*/
+
namespace Friendica\Module;
use Friendica\BaseModule;
-use Friendica\Core\Addon;
use Friendica\Core\Authentication;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
-use Friendica\Core\System;
/**
* Logout module
*/
public static function init()
{
- Addon::callHooks("logging_out");
+ Hook::callAll("logging_out");
Authentication::deleteSession();
info(L10n::t('Logged out.') . EOL);
self::getApp()->internalRedirect();
*/
namespace Friendica\Network;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\System;
DBA::update('user', ['login_date' => DateTimeFormat::utcNow()], ['uid' => $_SESSION['uid']]);
- Addon::callHooks('logged_in', $a->user);
+ Hook::callAll('logged_in', $a->user);
}
}
use Friendica\Content\ContactSelector;
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
}
$locate = ['location' => $item['location'], 'coord' => $item['coord'], 'html' => ''];
- Addon::callHooks('render_location', $locate);
+ Hook::callAll('render_location', $locate);
$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate));
// process action responses - e.g. like/dislike/attend/agree/whatever
];
$arr = ['item' => $item, 'output' => $tmp_item];
- Addon::callHooks('display_item', $arr);
+ Hook::callAll('display_item', $arr);
$result = $arr['output'];
use Friendica\Content\OEmbed;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\System;
$root = self::addHeader($doc, $owner, $author, $alternatelink, true);
/// @TODO This hook can't work anymore
- // Addon::callHooks('atom_feed', $atom);
+ // \Friendica\Core\Hook::callAll('atom_feed', $atom);
if (!DBA::isResult($items) || $onlyheader) {
$atom = trim($doc->saveXML());
- Addon::callHooks('atom_feed_end', $atom);
+ Hook::callAll('atom_feed_end', $atom);
return $atom;
}
$atom = trim($doc->saveXML());
- Addon::callHooks('atom_feed_end', $atom);
+ Hook::callAll('atom_feed_end', $atom);
return $atom;
}
*/
namespace Friendica\Render;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
/**
* Smarty implementation of the Friendica template engine interface
"template" => basename($s->filename),
"vars" => $r
];
- Addon::callHooks("template_vars", $arr);
+ Hook::callAll("template_vars", $arr);
$r = $arr['vars'];
foreach ($r as $key => $value) {
*/
namespace Friendica\Util;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\Logger;
-use Friendica\Util\Strings;
use ASN_BASE;
use ASNValue;
return $result;
} else {
$x = ['data' => $data, 'pubkey' => $pubkey, 'alg' => $alg, 'result' => $data];
- Addon::callHooks('other_encapsulate', $x);
+ Hook::callAll('other_encapsulate', $x);
return $x['result'];
}
return self::$fn(Strings::base64UrlDecode($data['data']), $k, $i);
} else {
$x = ['data' => $data, 'prvkey' => $prvkey, 'alg' => $alg, 'result' => $data];
- Addon::callHooks('other_unencapsulate', $x);
+ Hook::callAll('other_unencapsulate', $x);
return $x['result'];
}
*/
namespace Friendica\Util;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Protocol\Email;
*/
public static function send($params)
{
- Addon::callHooks('emailer_send_prepare', $params);
+ Hook::callAll('emailer_send_prepare', $params);
$email_textonly = false;
if (!empty($params['uid'])) {
'parameters' => $sendmail_params
];
- Addon::callHooks("emailer_send", $hookdata);
+ Hook::callAll("emailer_send", $hookdata);
$res = mail(
$hookdata['to'],
*/
namespace Friendica\Util;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
/**
* Leaflet Map related functions
$coord = trim($coord);
$coord = str_replace([',','/',' '],[' ',' ',' '],$coord);
$arr = ['lat' => trim(substr($coord,0,strpos($coord,' '))), 'lon' => trim(substr($coord,strpos($coord,' ')+1)), 'mode' => $html_mode, 'html' => ''];
- Addon::callHooks('generate_map',$arr);
+ Hook::callAll('generate_map',$arr);
return ($arr['html']) ? $arr['html'] : $coord;
}
public static function byLocation($location, $html_mode = 0) {
$arr = ['location' => $location, 'mode' => $html_mode, 'html' => ''];
- Addon::callHooks('generate_named_map',$arr);
+ Hook::callAll('generate_named_map',$arr);
return ($arr['html']) ? $arr['html'] : $location;
}
public static function getCoordinates($location) {
$arr = ['location' => $location, 'lat' => false, 'lon' => false];
- Addon::callHooks('Map::getCoordinates', $arr);
+ Hook::callAll('Map::getCoordinates', $arr);
return $arr;
}
}
*/
namespace Friendica\Util;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Network\CurlResult;
-use Friendica\Util\Strings;
use DOMDocument;
use DomXPath;
$avatar['url'] = '';
$avatar['success'] = false;
- Addon::callHooks('avatar_lookup', $avatar);
+ Hook::callAll('avatar_lookup', $avatar);
if (! $avatar['success']) {
$avatar['url'] = System::baseUrl() . '/images/person-300.jpg';
use DOMDocument;
use DOMXPath;
use Friendica\Content\OEmbed;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Database\DBA;
use Friendica\Object\Image;
-use Friendica\Util\Strings;
/**
* @brief Class with methods for extracting certain content from an url
Logger::log('Siteinfo for ' . $url . ' ' . print_r($siteinfo, true), Logger::DEBUG);
- Addon::callHooks('getsiteinfo', $siteinfo);
+ Hook::callAll('getsiteinfo', $siteinfo);
return $siteinfo;
}
namespace Friendica\Worker;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
$arr = ['url' => $url];
- Addon::callHooks('globaldir_update', $arr);
+ Hook::callAll('globaldir_update', $arr);
Logger::log('Updating directory: ' . $arr['url'], Logger::DEBUG);
if (strlen($arr['url'])) {
*/
namespace Friendica\Worker;
-use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\Worker;
$r = DBA::toArray(DBA::p("SELECT `id` FROM `queue` WHERE `next` < UTC_TIMESTAMP() ORDER BY `batch`, `cid`"));
- Addon::callHooks('queue_predeliver', $r);
+ Hook::callAll('queue_predeliver', $r);
if (DBA::isResult($r)) {
foreach ($r as $q_item) {
default:
$params = ['owner' => $owner, 'contact' => $contact, 'queue' => $q_item, 'result' => false];
- Addon::callHooks('queue_deliver', $params);
+ Hook::callAll('queue_deliver', $params);
if ($params['result']) {
QueueModel::removeItem($q_item['id']);