本文整理汇总了PHP中get_current_language函数的典型用法代码示例。如果您正苦于以下问题:PHP get_current_language函数的具体用法?PHP get_current_language怎么用?PHP get_current_language使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_current_language函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: translation_editor_plugins_boot_event
/**
* This function is executed during the 'plugins_boot' event, before most plugins are initialized
*
* @return void
*/
function translation_editor_plugins_boot_event()
{
// add the custom_keys_locations to language paths
$custom_keys_path = elgg_get_data_path() . 'translation_editor' . DIRECTORY_SEPARATOR . 'custom_keys' . DIRECTORY_SEPARATOR;
if (is_dir($custom_keys_path)) {
register_translations($custom_keys_path);
}
// force creation of static to prevent reload of unwanted translations
reload_all_translations();
if (elgg_in_context('translation_editor') || elgg_in_context('settings') || elgg_in_context('admin')) {
translation_editor_reload_all_translations();
}
translation_editor_load_custom_languages();
if (!elgg_in_context('translation_editor')) {
// remove disabled languages
translation_editor_unregister_translations();
}
// load custom translations
$user_language = get_current_language();
$elgg_default_language = 'en';
$load_languages = [$user_language, $elgg_default_language];
$load_languages = array_unique($load_languages);
$disabled_languages = translation_editor_get_disabled_languages();
foreach ($load_languages as $language) {
if (empty($disabled_languages) || !in_array($language, $disabled_languages)) {
// add custom translations
translation_editor_load_translations($language);
}
}
}
示例2: profile_fields_setup
/**
* This function loads a set of default fields into the profile, then triggers a hook letting other plugins to edit
* add and delete fields.
*
* Note: This is a secondary system:init call and is run at a super low priority to guarantee that it is called after all
* other plugins have initialised.
*/
function profile_fields_setup()
{
global $CONFIG;
$profile_defaults = array('description' => 'longtext', 'briefdescription' => 'text', 'location' => 'tags', 'interests' => 'tags', 'skills' => 'tags', 'contactemail' => 'email', 'phone' => 'text', 'mobile' => 'text', 'website' => 'url');
// TODO: Have an admin interface for this
$n = 0;
$loaded_defaults = array();
while ($translation = get_plugin_setting("admin_defined_profile_{$n}", 'profile')) {
// Add a translation
add_translation(get_current_language(), array("profile:admin_defined_profile_{$n}" => $translation));
// Detect type
$type = get_plugin_setting("admin_defined_profile_type_{$n}", 'profile');
if (!$type) {
$type = 'text';
}
// Set array
$loaded_defaults["admin_defined_profile_{$n}"] = $type;
$n++;
}
if (count($loaded_defaults)) {
$CONFIG->profile_using_custom = true;
$profile_defaults = $loaded_defaults;
}
$CONFIG->profile = trigger_plugin_hook('profile:fields', 'profile', NULL, $profile_defaults);
}
示例3: translation_editor_plugins_boot_event
function translation_editor_plugins_boot_event()
{
global $CONFIG;
run_function_once("translation_editor_version_053");
// add the custom_keys_locations to language paths
$custom_keys_path = $CONFIG->dataroot . "translation_editor" . DIRECTORY_SEPARATOR . "custom_keys" . DIRECTORY_SEPARATOR;
if (is_dir($custom_keys_path)) {
$CONFIG->language_paths[$custom_keys_path] = true;
}
// force creation of static to prevent reload of unwanted translations
reload_all_translations();
translation_editor_load_custom_languages();
if (elgg_get_context() != "translation_editor") {
// remove disabled languages
translation_editor_unregister_translations();
}
// load custom translations
$user_language = get_current_language();
$elgg_default_language = "en";
$load_languages = array($user_language, $elgg_default_language);
$load_languages = array_unique($load_languages);
$disabled_languages = translation_editor_get_disabled_languages();
foreach ($load_languages as $language) {
if (empty($disabled_languages) || !in_array($language, $disabled_languages)) {
// add custom translations
translation_editor_load_translations($language);
}
}
}
示例4: search_advanced_init
/**
* Initializes the plugin
*
* @return void
*/
function search_advanced_init()
{
// page handler for search actions and results
elgg_register_page_handler("search_advanced", "search_advanced_page_handler");
elgg_register_page_handler("search", "search_advanced_search_page_handler");
// search hooks
search_advanced_unregister_default_search_hooks();
search_advanced_register_search_hooks();
// unregister object:page from search
elgg_unregister_entity_type("object", "page_top");
// views
elgg_extend_view("css/elgg", "css/search_advanced/site");
elgg_extend_view("js/elgg", "js/search_advanced/site");
// widgets
elgg_register_widget_type("search", elgg_echo("search"), elgg_echo("search"), array("profile", "dashboard", "index", "groups"), true);
elgg_register_widget_type("search_user", elgg_echo("search_advanced:widgets:search_user:title"), elgg_echo("search_advanced:widgets:search_user:description"), array("dashboard", "index"));
if (elgg_is_active_plugin("categories")) {
// make universal categories searchable
add_translation(get_current_language(), array("tag_names:universal_categories" => elgg_echo("categories")));
elgg_register_tag_metadata_name("universal_categories");
}
// hooks and events to clear cache
// register hooks
elgg_register_plugin_hook_handler("action", "admin/plugins/activate", "search_advanced_clear_keywords_cache");
elgg_register_plugin_hook_handler("action", "admin/plugins/deactivate", "search_advanced_clear_keywords_cache");
elgg_register_plugin_hook_handler("action", "admin/plugins/activate_all", "search_advanced_clear_keywords_cache");
elgg_register_plugin_hook_handler("action", "admin/plugins/deactivate_all", "search_advanced_clear_keywords_cache");
elgg_register_plugin_hook_handler("action", "plugins/settings/save", "search_advanced_clear_keywords_cache");
elgg_register_plugin_hook_handler("register", "menu:search_type_selection", "search_advanced_register_menu_type_selection");
// register events
elgg_register_event_handler("upgrade", "system", "search_advanced_clear_keywords_cache");
// actions
elgg_register_action("search_advanced/settings/save", dirname(__FILE__) . "/actions/plugins/settings/save.php", "admin");
}
示例5: profile_manager_profile_override
/**
* Hook to replace the profile fields
*
* @param $hook_name
* @param $entity_type
* @param $return_value
* @param $parameters
* @return unknown_type
*/
function profile_manager_profile_override($hook_name, $entity_type, $return_value, $parameters)
{
global $CONFIG;
// Get all the custom profile fields
$options = array("type" => "object", "subtype" => CUSTOM_PROFILE_FIELDS_PROFILE_SUBTYPE, "limit" => false, "owner_guid" => $CONFIG->site_guid);
if ($entities = elgg_get_entities($options)) {
$result = array();
$translations = array();
$context = elgg_get_context();
// Make new result
foreach ($entities as $entity) {
if ($entity->admin_only != "yes" || elgg_is_admin_logged_in()) {
$result[$entity->metadata_name] = $entity->metadata_type;
// should it be handled as tags? TODO: is this still needed? Yes it is, it handles presentation of these fields in listing mode
if ($context == "search" && ($entity->output_as_tags == "yes" || $entity->metadata_type == "multiselect")) {
$result[$entity->metadata_name] = "tags";
}
}
$translations["profile:" . $entity->metadata_name] = $entity->getTitle();
}
add_translation(get_current_language(), $translations);
if (count($result) > 0) {
$result["custom_profile_type"] = "non_editable";
}
}
return $result;
}
示例6: content_subscriptions_prepare_comment_notification
/**
* Change the default notification message for comments
*
* @param string $hook the name of the hook
* @param stirng $type the type of the hook
* @param Elgg_Notifications_Notification $return_value the current return value
* @param array $params supplied values
*
* @return Elgg_Notifications_Notification
*/
function content_subscriptions_prepare_comment_notification($hook, $type, $return_value, $params)
{
if (empty($return_value) || !$return_value instanceof \Elgg\Notifications\Notification) {
return $return_value;
}
if (empty($params) || !is_array($params)) {
return $return_value;
}
$event = elgg_extract("event", $params);
if (empty($event) || !$event instanceof \Elgg\Notifications\Event) {
return $return_value;
}
// ignore access for now
$ia = elgg_set_ignore_access(true);
$comment = $event->getObject();
$actor = $event->getActor();
$object = $comment->getContainerEntity();
$language = elgg_extract("language", $params, get_current_language());
$recipient = elgg_extract("recipient", $params);
$return_value->subject = elgg_echo("content_subscriptions:create:comment:subject", array($object->title), $language);
$return_value->body = elgg_echo("content_subscriptions:create:comment:message", array($recipient->name, $actor->name, $object->title, $comment->description, $object->getURL()), $language);
$return_value->summary = elgg_echo("content_subscriptions:create:comment:summary", array($object->title), $language);
// restore access
elgg_set_ignore_access($ia);
return $return_value;
}
示例7: prototyper_group_get_prototype_fields
/**
* Returns prototyped fields
*
* @param string $hook "prototype"
* @param string $type "groups/edit"
* @param array $return Fields
* @param array $params Hook params
* @return array
*/
function prototyper_group_get_prototype_fields($hook, $type, $return, $params)
{
$entity = elgg_extract('entity', $params);
$subtype = $entity->getSubtype() ?: 'default';
$prototype = elgg_get_plugin_setting("prototype:{$subtype}", 'prototyper_group');
if (!$prototype && $subtype != 'default') {
$prototype = elgg_get_plugin_setting('prototype:default', 'prototyper_group');
}
if ($prototype) {
$prototype_fields = unserialize($prototype);
$return = array_merge($return, $prototype_fields);
} else {
$fields = elgg_get_config('group');
$return['icon'] = ['type' => 'icon', 'data_type' => 'file', 'label' => [get_current_language() => elgg_echo('groups:icon')], 'help' => false];
$return['description'] = ['type' => 'description', 'data_type' => 'attribute', 'label' => [get_current_language() => elgg_echo('groups:description')], 'help' => false];
foreach ($fields as $shortname => $input_type) {
$return[$shortname] = ['type' => $input_type, 'data_type' => 'metadata', 'label' => [get_current_language() => elgg_echo("groups:{$shortname}")], 'help' => false];
}
}
// Not adding these above, as we want them to persist, even if they are deleted from the UI
$return['name'] = ['type' => 'name', 'data_type' => 'attribute', 'class_name' => \hypeJunction\Prototyper\Groups\NameField::class, 'label' => [get_current_language() => elgg_echo('groups:name')], 'help' => false, 'priority' => 1];
$return['membership'] = ['type' => 'membership', 'data_type' => 'metadata', 'id' => 'groups-membership', 'input_view' => 'input/groups/membership', 'output_view' => false, 'class_name' => hypeJunction\Prototyper\Groups\MembershipField::class, 'label' => [get_current_language() => elgg_echo("groups:membership")], 'help' => false, 'priority' => 900];
// treating this as metadata so that it gets handled after the entity has been saved once and group_acl has been created
$return['vis'] = ['type' => 'access', 'data_type' => 'metadata', 'id' => 'groups-vis', 'input_view' => 'input/groups/visibility', 'output_view' => false, 'class_name' => hypeJunction\Prototyper\Groups\VisibilityField::class, 'label' => [get_current_language() => elgg_echo("groups:visibility")], 'help' => false, 'priority' => 900];
$return['content_access_mode'] = ['type' => 'content_access_mode', 'data_type' => 'metadata', 'id' => 'groups-content-access-mode', 'input_view' => 'input/groups/content_access_mode', 'output_view' => false, 'class_name' => hypeJunction\Prototyper\Groups\ContentAccessModeField::class, 'label' => [get_current_language() => elgg_echo("groups:content_access_mode")], 'help' => false, 'priority' => 900];
$return['owner_guid'] = ['type' => 'select', 'data_type' => 'attribute', 'input_view' => 'input/groups/owner', 'output_view' => false, 'class_name' => hypeJunction\Prototyper\Groups\OwnerField::class, 'label' => [get_current_language() => elgg_echo("groups:owner")], 'help' => false, 'priority' => 900];
$return['tools'] = ['type' => 'checkboxes', 'data_type' => 'metadata', 'input_view' => 'input/groups/tools', 'output_view' => false, 'class_name' => hypeJunction\Prototyper\Groups\ToolsField::class, 'label' => false, 'help' => false, 'priority' => 900];
return $return;
}
示例8: extended_tinymce_get_user_language
function extended_tinymce_get_user_language()
{
$user_language = get_current_language();
$path = elgg_get_plugins_path() . "extended_tinymce/vendor/tinymce/js/tinymce/langs";
if (!file_exists("{$path}/{$user_language}.js")) {
return extended_tinymce_get_site_language();
}
return $user_language;
}
示例9: recaptcha_init
function recaptcha_init()
{
if (!is_recaptcha_enabled()) {
return;
}
elgg_register_js('recaptcha', 'https://www.google.com/recaptcha/api.js?hl=' . get_current_language());
elgg_register_plugin_hook_handler('actionlist', 'captcha', 'image_captcha_actionlist_hook');
$actions = array('register', 'user/requestnewpassword');
foreach ($actions as $action) {
elgg_register_plugin_hook_handler('action', $action, 'recaptcha_action_hook');
}
}
示例10: init
/**
* Initialize the plugin
* @return void
*/
function init()
{
// Register actions
$actions_path = dirname(__FILE__) . "/actions/db_explorer/";
elgg_register_action('db_explorer/entities', $actions_path . 'entities.php', 'admin');
elgg_register_action('db_explorer/users_entity', $actions_path . 'users_entity.php', 'admin');
elgg_register_action('db_explorer/objects_entity', $actions_path . 'objects_entity.php', 'admin');
elgg_register_action('db_explorer/groups_entity', $actions_path . 'groups_entity.php', 'admin');
elgg_register_action('db_explorer/sites_entity', $actions_path . 'sites_entity.php', 'admin');
elgg_register_action('db_explorer/owned_entities', $actions_path . 'owned_entities.php', 'admin');
elgg_register_action('db_explorer/contained_entities', $actions_path . 'contained_entities.php', 'admin');
elgg_register_action('db_explorer/river_items', $actions_path . 'river_items.php', 'admin');
elgg_register_action('db_explorer/metadata', $actions_path . 'metadata.php', 'admin');
elgg_register_action('db_explorer/metadata_ownership', $actions_path . 'metadata_ownership.php', 'admin');
elgg_register_action('db_explorer/annotations', $actions_path . 'annotations.php', 'admin');
elgg_register_action('db_explorer/annotations_ownership', $actions_path . 'annotations_ownership.php', 'admin');
elgg_register_action('db_explorer/private_settings', $actions_path . 'private_settings.php', 'admin');
elgg_register_action('db_explorer/access_collections_ownership', $actions_path . 'access_collections_ownership.php', 'admin');
elgg_register_action('db_explorer/access_collections_membership', $actions_path . 'access_collections_membership.php', 'admin');
elgg_register_action('db_explorer/entity_relationships', $actions_path . 'entity_relationships.php', 'admin');
elgg_register_action('db_explorer/batch', $actions_path . 'batch.php');
elgg_register_action('db_explorer/user/validate', $actions_path . 'user/validate.php');
elgg_register_action('db_explorer/user/ban', $actions_path . 'user/ban.php');
elgg_register_action('db_explorer/user/unban', $actions_path . 'user/unban.php');
elgg_register_action('db_explorer/user/enable', $actions_path . 'user/enable.php');
elgg_register_action('db_explorer/user/disable', $actions_path . 'user/disable.php');
elgg_register_action('db_explorer/user/delete', $actions_path . 'user/delete.php');
elgg_register_action('db_explorer/content/enable', $actions_path . 'content/enable.php');
elgg_register_action('db_explorer/content/disable', $actions_path . 'content/disable.php');
elgg_register_action('db_explorer/content/delete', $actions_path . 'content/delete.php');
// Register javascripts
elgg_define_js('jqgrid', array('src' => '/mod/hypeDBExplorer/vendors/jqgrid/js/minified/jquery.jqGrid.min.js', 'deps' => array('jquery', 'jqgrid.locale')));
$locale = get_current_language();
elgg_define_js('jqgrid.locale', array('src' => "/mod/hypeDBExplorer/vendors/jqgrid/js/i18n/grid.locale-{$locale}.js", 'deps' => array('jquery')));
// Register stylesheets
//elgg_register_css('jquery.jqgrid', '/mod/hypeDBExplorer/vendor/jqgrid/css/ui.jqgrid.css');
elgg_register_css('db_explorer.jquery-ui', '/mod/hypeDBExplorer/vendors/jquery-ui/themes/smoothness/jquery-ui.min.css');
elgg_register_css('db_explorer.stylesheet', elgg_get_simplecache_url('css', 'framework/db_explorer/stylesheet.css'));
if (elgg_is_admin_logged_in()) {
if (elgg_get_config('debug')) {
// Register menu items to quickly navigate to the DB explorer for the given user/entity
elgg_register_plugin_hook_handler('register', 'menu:user_hover', __NAMESPACE__ . '\\user_hover_menu_setup');
elgg_register_plugin_hook_handler('register', 'menu:entity', __NAMESPACE__ . '\\entity_menu_setup');
}
// Register ajax views
elgg_register_ajax_view('admin/developers/db_explorer');
// Add an admin menu item
elgg_register_menu_item('page', array('name' => 'db_explorer', 'href' => 'admin/developers/db_explorer', 'text' => elgg_echo('admin:developers:db_explorer'), 'context' => 'admin', 'section' => 'develop'));
}
}
示例11: widget_manager_extra_contexts_page_handler
/**
* Handles the extra contexts page
*
* @param array $page page elements
* @param string $handler handler of the current page
*
* @return boolean
*/
function widget_manager_extra_contexts_page_handler($page, $handler)
{
$result = false;
$extra_contexts = elgg_get_plugin_setting("extra_contexts", "widget_manager");
if (widget_manager_is_extra_context($handler)) {
$result = true;
// make nice lightbox popup title
add_translation(get_current_language(), array("widget_manager:widgets:lightbox:title:" . strtolower($handler) => $handler));
// backwards compatibility
set_input("handler", $handler);
include dirname(dirname(__FILE__)) . "/pages/extra_contexts.php";
}
return $result;
}
示例12: zhgroups_fields_setup
function zhgroups_fields_setup()
{
$profile_defaults = array('description' => 'longtext', 'interests' => 'tags', 'country' => 'dropdown', 'state' => 'dropdown', 'city' => 'text');
$profile_defaults = elgg_trigger_plugin_hook('profile:fields', 'group', NULL, $profile_defaults);
elgg_set_config('group', $profile_defaults);
// register any tag metadata names
foreach ($profile_defaults as $name => $type) {
if ($type == 'tags') {
elgg_register_tag_metadata_name($name);
// only shows up in search but why not just set this in en.php as doing it here
// means you cannot override it in a plugin
add_translation(get_current_language(), array("tag_names:{$name}" => elgg_echo("groups:{$name}")));
}
}
}
示例13: format_friendlytime
/**
* Format the friendly time
*
* @param type $hook
* @param type $type
* @param type $return
* @param type $params
* @return type
*/
function format_friendlytime($hook, $type, $return, $params)
{
$language = get_current_language();
// get our language dependent settings
$format1 = elgg_get_plugin_setting('format1' . $language, PLUGIN_ID);
$format1override = elgg_get_plugin_setting('format1override' . $language, PLUGIN_ID);
$format2 = elgg_get_plugin_setting('format2' . $language, PLUGIN_ID);
$format2override = elgg_get_plugin_setting('format2override' . $language, PLUGIN_ID);
$breaktime = (int) elgg_get_plugin_setting('breaktime' . $language, PLUGIN_ID);
$offset = (int) elgg_get_plugin_setting('offset' . $language, PLUGIN_ID);
// use regular time for elgg default, modtime otherwise
$time = $params['time'];
$modtime = $time + 60 * 60 * $offset;
$format = 1;
if (!empty($breaktime) && $params['time'] < time() - 60 * 60 * $breaktime) {
$format = 2;
}
if ($format == 1) {
if (empty($format1override)) {
$check = $format1;
} else {
return translate_friendlytime($format1override, $modtime);
}
}
if ($format == 2) {
if (empty($format2override)) {
$check = $format2;
} else {
return translate_friendlytime($format2override, $modtime);
}
}
// nothing set, keep as elgg default
if (empty($check)) {
$check = 1;
}
switch ($check) {
case 1:
// default, leave $return alone
break;
case 2:
$return = elgg_echo('flexible_friendlytime:format:1', array(translate_friendlytime('M j, Y', $modtime), translate_friendlytime('g:ia', $modtime)));
break;
default:
$return = translate_friendlytime($check, $modtime);
break;
}
return $return;
}
示例14: set_new_notification_message
/**
* When an (admin) user is updating any customized email message,
* this function is doing the work
*
* @param $message_key: The key for the language file (e.g. email:validate:body )
* @param $message_value: The new value for that key
* @param $plugin_name: The plugin name of which we are updating the language file
*/
function set_new_notification_message($message_key, $message_value, $plugin_name)
{
//If the $message_key is invalid, nothing to do
if ($message_key === null || $message_key == "") {
error_log("dreamfish_admin::start.php::set_new_notification_message: message_key invalid!");
return false;
}
//Not going to update an entry with an invalid message
if ($message_value === null || $message_value == "") {
error_log("dreamfish_admin::start.php::set_new_notification_message: message_value invalid!");
return false;
}
// Load configuration
global $CONFIG;
//get the current language, exchanging values in language file dependent on language
$language = get_current_language();
//construct the path to the language file
//if there is a plugin name prepend /mod/<plugin-name>/ to the language file name
$root = $CONFIG->path;
if ($plugin_name !== null) {
$root = $CONFIG->pluginspath . $plugin_name . "/";
}
$language_file = $root . "languages/" . $language . ".php";
if (!file_exists($language_file)) {
error_log(elgg_echo('dreamfish_admin:file_not_saved'));
error_log(elgg_echo('dreamfish_admin:lang_not_found'));
register_error(elgg_echo('dreamfish_admin:file_not_saved'));
register_error(elgg_echo('dreamfish_admin:lang_not_found'));
forward($_SERVER['HTTP_REFERER']);
return false;
}
//read the file into a string
$content = file_get_contents($language_file, FILE_TEXT);
//the message value shall not contain undesired characters
$message_value = df_sanitize_string($message_value);
//we exchange the values through a regular expression
$pattern = "/" . $message_key . "(.*?)(\"|'),/s";
$replacement = $message_key . "' => \"" . $message_value . "\",";
//error_log("pattern: " .$pattern . " replacement: " . $replacement);
//apply the regex
$new_file = preg_replace($pattern, $replacement, $content);
//write new language file
file_put_contents($language_file, $new_file);
return true;
}
示例15: init
function init()
{
/**
* Pages and URLs
*/
elgg_register_page_handler(PAGEHANDLER, __NAMESPACE__ . '\\page_handler');
/**
* Actions
*/
elgg_register_action(PLUGIN_ID . '/settings/save', __DIR__ . '/actions/settings/maps.php', 'admin');
elgg_register_action('maps/geopositioning/update', __DIR__ . '/actions/geopositioning/update.php', 'public');
/**
* JS and CSS
*/
$libs = array_filter(elgg_get_config('google_maps_libraries'));
$gmaps_lib = elgg_http_add_url_query_elements('//maps.googleapis.com/maps/api/js', array('key' => elgg_get_plugin_setting('google_api_key', PLUGIN_ID), 'libraries' => implode(',', $libs), 'language' => get_current_language(), 'output' => 'svembed'));
elgg_register_js('google.maps', $gmaps_lib);
elgg_register_simplecache_view('css/framework/maps/stylesheet');
elgg_register_css('maps', elgg_get_simplecache_url('css', 'framework/maps/stylesheet'));
$plugin_root = __DIR__;
if (file_exists("{$plugin_root}/vendor/autoload.php")) {
$path = '/mod/' . PLUGIN_ID;
} else {
$path = '';
}
elgg_register_js('jquery.sticky-kit', $path . '/vendor/bower-asset/sticky-kit/jquery.sticky-kit.min.js', 'footer', 500);
elgg_register_simplecache_view('js/framework/maps/mapbox');
elgg_register_js('maps.mapbox', elgg_get_simplecache_url('js', 'framework/maps/mapbox'), 'footer', 550);
// Add User Location to config
elgg_extend_view('js/initialize_elgg', 'js/framework/maps/config');
/**
* Hooks
*/
elgg_register_plugin_hook_handler('search:site', 'maps', __NAMESPACE__ . '\\setup_site_search_maps');
// Replace a list with a map when ?list_type=mapbox
elgg_register_plugin_hook_handler('view', 'page/components/list', __NAMESPACE__ . '\\list_type_map_view');
elgg_register_plugin_hook_handler('view', 'page/components/gallery', __NAMESPACE__ . '\\list_type_map_view');
// Filter out views when loading map items via ajax
elgg_register_plugin_hook_handler('view', 'all', __NAMESPACE__ . '\\ajax_list_view');
// Map Markers
elgg_register_plugin_hook_handler('entity:icon:url', 'user', __NAMESPACE__ . '\\get_marker_url', 600);
elgg_register_plugin_hook_handler('entity:icon:url', 'object', __NAMESPACE__ . '\\get_marker_url', 600);
elgg_register_widget_type('staticmap', elgg_echo('maps:widget:staticmap'), elgg_echo('maps:widget:staticmap:desc'), array('all'), true);
}