Loading modules/drowl_paragraphs_type_markup/drowl_paragraphs_type_markup.module 0 → 100644 +13 −0 Original line number Diff line number Diff line <?php /** * Implements HOOK_preprocess_paragraph__TYPE(). */ function drowl_paragraphs_type_markup_preprocess_paragraph__markup(&$variables) { // To ensure the markup is rendered even with empty region check, // we add the empty-check-workaround. Typically markup like Javascript // might not have visual output, but should be rendered anyway! if (!empty($variables['content']['field_paragraphs_markup'][0])) { $variables['content']['field_paragraphs_markup'][0]['#suffix'] .= '<span class="empty-check-workaround element-hidden"> </span>'; } } Loading
modules/drowl_paragraphs_type_markup/drowl_paragraphs_type_markup.module 0 → 100644 +13 −0 Original line number Diff line number Diff line <?php /** * Implements HOOK_preprocess_paragraph__TYPE(). */ function drowl_paragraphs_type_markup_preprocess_paragraph__markup(&$variables) { // To ensure the markup is rendered even with empty region check, // we add the empty-check-workaround. Typically markup like Javascript // might not have visual output, but should be rendered anyway! if (!empty($variables['content']['field_paragraphs_markup'][0])) { $variables['content']['field_paragraphs_markup'][0]['#suffix'] .= '<span class="empty-check-workaround element-hidden"> </span>'; } }