Created
May 2, 2016 18:34
-
-
Save mortendk/0d9ff4426c8c82221b2b2ad1cfe80f47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Implements hook_preprocess_menu(). | |
| */ | |
| function vanilla_preprocess_menu(&$vars, $hook) { | |
| if ($hook == 'menu_main') { | |
| kint($hook); | |
| $items = $vars['items']; | |
| foreach ($items as $key => $item) { | |
| $original_title = $vars['items'][$key]['title']; | |
| $vars['items'][$key]['title'] = array( | |
| '#markup' => $original_title, | |
| '#allowed_tags' => array('span', 'svg', 'use'), | |
| ); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment