boot(); /** * Legacy function. Previously was in wbLib but not compatible with having multiple instance * of wbLib running on the same site (as only one factory will be used depending on which * app register this function first. * This was never documented publicly and sh404SEF was the only one using it but * added a safety copy here, in case someone used it for a filter. */ if (!function_exists('wbAddHook')) { /** * Add a hook, identified by an id (wblib.some_name), * a callback and a priority * * @param string $hookName Unique identifier for the hook * @param Callable $hookHandler Callback to execute * @param int $priority Higher priorities are executed first. Default to 100. */ function wbAddHook($hookName, $hookHandler, $priority = 100) { Factory::get()->getThe('hook')->add( $hookName, $hookHandler, $priority ); } }