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.
elgg_register_plugin_hook_handler('route', 'all', 'remove_pg_handlers');
function remove_pg_handlers($hook, $type, $return, $params) {
return false;
}
Now if you want to remove specific page handlers use elgg_unregister_pagehandler()
Great! It worked perfectly! Thank you :)
And now I also want to remove default css and js. I used
elgg_unregister_css('elgg');
elgg_unregister_js('elgg');
It worked but the vendor jquery 1.6.4 is still used. I want to replace it by jquery 1.7.2 or another js library such as mootools, dojo. So how to do it ?
Thank you :)
Use elgg_register_js(). I recommend always reading the inline documentation for functions because it usually points you to related functions. Also, look at the bundled plugins for examples of many of these things.
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.