aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profile/start.php')
-rw-r--r--mod/profile/start.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/mod/profile/start.php b/mod/profile/start.php
index 90caa8f64..17a55e1f9 100644
--- a/mod/profile/start.php
+++ b/mod/profile/start.php
@@ -50,7 +50,11 @@ function profile_init() {
// Now override icons
register_plugin_hook('entity:icon:url', 'user', 'profile_usericon_hook');
-
+
+ // allow ECML in parts of the profile
+ register_plugin_hook('get_views', 'ecml', 'profile_ecml_views_hook');
+
+ // default profile fields admin item
elgg_add_admin_submenu_item('defaultprofile', elgg_echo('profile:edit:default'), 'appearance');
}
@@ -258,6 +262,20 @@ function profile_usericon_hook($hook, $entity_type, $returnvalue, $params){
}
}
+/**
+ * Parse ECML on parts of the profile
+ *
+ * @param unknown_type $hook
+ * @param unknown_type $entity_type
+ * @param unknown_type $return_value
+ * @param unknown_type $params
+ */
+function profile_ecml_views_hook($hook, $entity_type, $return_value, $params) {
+ $return_value['profile/profile_content'] = elgg_echo('profile');
+
+ return $return_value;
+}
+
// Make sure the profile initialisation function is called on initialisation
register_elgg_event_handler('init','system','profile_init',1);
register_elgg_event_handler('init','system','profile_fields_setup', 10000); // Ensure this runs after other plugins