It would make for a better developer experience if the functions that define 'linked_logo' and 'linked_site_name' on preprocess variables in zurb_foundation.theme were available in more twig contexts. I would suggest extracting the code defining these into a separate function which can more neatly be called, not just from zurb_foundation_preprocess_page but also the as-yet-undefined zurb_foundation_preprocess_region , and perhaps elsewhere.
I would suggest get_linked_logo and get_linked_site_name as function names inside zurb_foundation.theme which would return the object that is set as $variables['linked_logo'] and $variables['linked_site_name'] .
This would be backwards compatible zurb_foundation_preprocess_page would continue to produce the same array as before.
Comments
Comment #2
hongpong commentedThese may get removed so I am postponing. see #2651666: Remove duplicate hard coded logo and site name in theme
Comment #3
sim_1Since the patch from #2651666 is now merged, I'm closing this as "won't fix".