From: Cash Costello Date: Fri, 31 May 2013 11:52:42 +0000 (-0400) Subject: Fixes #5572 not including embed link in longtext menu for users who are logged out X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=f90dce8ad3cc15b008f0ce71ce9e93377be06a5b;p=lorea%2Felgg.git Fixes #5572 not including embed link in longtext menu for users who are logged out --- diff --git a/mod/embed/start.php b/mod/embed/start.php index e14e0efd4..1da35aa46 100644 --- a/mod/embed/start.php +++ b/mod/embed/start.php @@ -14,8 +14,10 @@ elgg_register_event_handler('init', 'system', 'embed_init'); function embed_init() { elgg_extend_view('css/elgg', 'embed/css'); elgg_extend_view('css/admin', 'embed/css'); - - elgg_register_plugin_hook_handler('register', 'menu:longtext', 'embed_longtext_menu'); + + if (elgg_is_logged_in()) { + elgg_register_plugin_hook_handler('register', 'menu:longtext', 'embed_longtext_menu'); + } elgg_register_plugin_hook_handler('register', 'menu:embed', 'embed_select_tab', 1000); // Page handler for the modal media embed