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

HongPong created an issue. See original summary.

hongpong’s picture

Status: Active » Postponed
Related issues: +#2651666: Remove duplicate hard coded logo and site name in theme

These may get removed so I am postponing. see #2651666: Remove duplicate hard coded logo and site name in theme

sim_1’s picture

Status: Postponed » Closed (won't fix)

Since the patch from #2651666 is now merged, I'm closing this as "won't fix".