What hook is run on every page before hook_preprocess_page()?

  • 4
    Consider using an event subscriber as explained in this change record: hook_init() removed – Neograph734 May 17 '18 at 8:37
  • Wild guess: hook_preprocess_html(). – leymannx May 17 '18 at 8:42
  • But tbh, please try to provide a little bit more info. What are you trying to achieve exactly? Depending on that giving you just another hook (if exists) might just be wrong. Please also see How to ask a good question. – leymannx May 17 '18 at 8:44
  • Apart from that you are also able to change the implementation order of modules targeting a specific hook. – leymannx May 17 '18 at 8:47
  • Brilliant answer on how to replace hook init with an event subscribers: drupal.stackexchange.com/a/173920/15055 – leymannx May 17 '18 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.