I'm writing a plugin hook. Now, it has a hook handler as follows
elgg_register_plugin_hook_handler('index', 'system', 'oa_pc_plugin_hook_handler', 1);
And how can I get the identifier in oa_pc_plugin_hook_handler()?
How to get "hello" ?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Team Webgalli@webgalli
Team Webgalli - 0 likes
- Geany@drnoxxx
Geany - 0 likes
- Brett@brett.profitt
Brett - 0 likes
You must log in to post replies.Are you mentioning about page_handlers?
Yes, page handler. I want to get it in a hook handler function.
Plugin hooks and page handlers are different things. The hook you listed will only be fired for the index page (root or /).
The standard way to use page handlers is to register with elgg_register_page_handler(). More info here: http://docs.elgg.org/wiki/Engine/Controllers/PageHandler
There is a hook you can use that will trigger for every page handler: route, all. The registered handler and pages array are passed as params.