',
$back_media,
$back_title,
$back_subtitle,
$back_desc,
$button_html
);
// tabindex makes the card focusable so the flip can be triggered by
// keyboard: the animation is CSS-driven off :hover, and module.scss now
// pairs every one of those rules with :focus-within. Without a focusable
// element the back side was unreachable without a mouse.
$children = sprintf(
'
%2$s%3$s
',
esc_attr(implode(' ', $classes)),
$front_card,
$back_card
);
return Module::render(
[
'attrs' => $attrs,
'elements' => $elements,
'id' => $block->parsed_block['id'],
'name' => $block->block_type->name,
'moduleCategory' => $block->block_type->category,
'classnamesFunction' => [self::class, 'module_classnames'],
'stylesComponent' => [self::class, 'module_styles'],
'scriptDataComponent' => [self::class, 'module_script_data'],
'orderIndex' => $block->parsed_block['orderIndex'] ?? 0,
'storeInstance' => $block->parsed_block['storeInstance'] ?? null,
'children' => [
// Background pattern/mask and the box-shadow overlay are DOM,
// not CSS. Without this call Divi renders them in the builder
// and nowhere else, so the options silently do nothing on the
// front end.
$elements->style_components(['attrName' => 'module']),
$children,
],
]
);
}
}