The concept of preprocess functions is a powerful step towards the mythical ideal of separating logic from presentation. However, currently, you can only have preprocess functions for theme hooks implemented as templates, and not for theme hooks implemented as functions. This introduces an unnecessary coupling between what a module should be concerned about (preprocessing data sent to a theme implementation) and what a theme should be concerned about (whether a particular hook is implemented as a function or as a template).
Has the idea of allowing preprocess functions to run on theme hooks implemented as functions already been discussed and shot down? If so, please point me to that discussion if it's online. Otherwise, please add comments if you like this idea or if you have concerns about it, and I'll be happy to create a patch for it.
|Unable to apply patch theme-processors_for_function_implementations-400292-38.patch|
|Unable to apply patch theme-processors_for_function_implementations-400292-32.patch|
|Passed: 12203 passes, 0 fails, 0 exceptions|
|Passed: 12233 passes, 0 fails, 0 exceptions|