Порядок выполнения preprocess функций

Order of preprocess execution

as to which function runs in what order. Fortunately, there are just three simple rules that are used to determine the order of processing. They are as follows:

  1. All preprocess functions run before all process functions
  2. template_ prefixed[module]_ prefixed functions run
  3. next. [theme]_ prefixed functions run last

This results in the following order of execution for a particular theme hook:

  1. template_preprocess()
  2. template_preprocesss_HOOK()
  3. MODULE_preprocess()
  4. MODULE_preprocess_HOOK()
  5. THEME_preprocess()
  6. THEME_preprocess_HOOK()
  7. template_process()
  8. template_processs_HOOK()
  9. MODULE_process()
  10. MODULE_process_HOOK()
  11. THEME_process()
  12. THEME_process_HOOK()