start.php 901 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * Main file for the Embed Extended plugin
  4. */
  5. // register default Elgg events
  6. elgg_register_event_handler('init', 'system', 'embed_extended_init');
  7. /**
  8. * Gets called when the Elgg system initializes
  9. *
  10. * @return void
  11. */
  12. function embed_extended_init() {
  13. // add CSS / JS
  14. elgg_extend_view('css/elgg', 'css/embed_extended.css');
  15. elgg_extend_view('css/admin', 'css/embed_extended.css');
  16. elgg_extend_view('js/elgg', 'js/embed_extended/site');
  17. // register page handler
  18. elgg_register_ajax_view('embed_extended/list', 'embed_extended_page_handler');
  19. // register plugin hooks
  20. elgg_register_plugin_hook_handler('register', 'menu:embed', '\ColdTrick\EmbedExtended\Menus::embedMenuRegister');
  21. elgg_register_plugin_hook_handler('prepare', 'menu:longtext', '\ColdTrick\EmbedExtended\Menus::longtextMenuPrepare');
  22. elgg_unextend_view('js/embed/embed', 'js/elgg/ckeditor/insert.js');
  23. }