aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/ecml/start.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/mod/ecml/start.php b/mod/ecml/start.php
index 7bb5f919f..07d30949a 100644
--- a/mod/ecml/start.php
+++ b/mod/ecml/start.php
@@ -30,9 +30,6 @@ function ecml_init() {
register_page_handler('ecml_admin', 'ecml_admin_page_handler');
register_elgg_event_handler('pagesetup', 'system', 'ecml_pagesetup');
- // parse views for keywords
- register_plugin_hook('display', 'view', 'ecml_parse_view');
-
// show ECML-enabled icon on free-text input areas
elgg_extend_view('input/longtext', 'ecml/input_ext');
elgg_extend_view('input/plaintext', 'ecml/input_ext');
@@ -45,6 +42,10 @@ function ecml_init() {
// Wants array('view_name' => 'Short Description')
$CONFIG->ecml_parse_views = trigger_plugin_hook('get_views', 'ecml', NULL, array());
+ foreach ($CONFIG->ecml_parse_views as $view => $desc) {
+ register_plugin_hook('view', $view, 'ecml_parse_view');
+ }
+
// provide a few built-in ecml keywords.
// @todo could pull this out into an array here to save an API call.
register_plugin_hook('get_keywords', 'ecml', 'ecml_keyword_hook');