Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As far as I can tell, it's not possible for a theme to add a preprocessor for template_preprocess_calendar. There is no template called calendar.tpl, so strictly speaking it's a helper function and not a preprocessor. This should be renamed to save themers banging their heads on the desk ;)
Comments
Comment #1
AaronBaumanjust ran into this myself.
#1966816: template_preprocess_calendar is not actually a preprocess implementation
template_preprocess_calendar() is called directly a number of times.
there's no way to override it with a hook_preprocess_* function.
there's no implementation of theme_calendar() for which this preprocessor function would even be called.
the naming of this function is misleading and confusing.
(at least) two possible solutions:
* implement theme_calendar() so that this function actually makes sense
* rename template_preprocess_calendar(), removing "template" and "preprocess"
Comment #2
apadernoI am closing this issue, since it's for a Drupal version no longer supported.