Created
January 15, 2015 21:47
-
-
Save mglaman/f9460f9c1bd6bf230dd5 to your computer and use it in GitHub Desktop.
Fix Media WYSIWYG filter embeds to pre-alpha4
This file contains 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
<?php | |
/** | |
* Implements hook_media_wysiwyg_token_to_markup_alter(). | |
*/ | |
function mymodule_media_wysiwyg_token_to_markup_alter(&$element, $tag_info, $settings) { | |
// Undo the damage done by #2194821 | |
if (isset($element['content']['#type']) && $element['content']['#type'] == 'container') { | |
unset($element['content']['#type']); | |
unset($element['content']['#theme']); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment